Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upPillar support #43
Merged
Pillar support #43
+249
−39
Conversation
|
Output looks good. Do you need a test to confirm that very large times only have sigfigs highlighted in h component? |
R/colformat.R
Outdated
| @@ -0,0 +1,44 @@ | |||
| cf_data.hms <- function(x, ...) { | |||
hadley
Sep 5, 2017
Member
I think you need a comment here along the lines of "dynamically exported; see zzz.R
I think you need a comment here along the lines of "dynamically exported; see zzz.R
krlmlr
Sep 7, 2017
Author
Member
Done.
Done.
|
Added a test for hms with 1000 hours. |
|
Looks good and NA placement is much better. |
Codecov Report
@@ Coverage Diff @@
## master #43 +/- ##
=========================================
+ Coverage 98.63% 99.2% +0.56%
=========================================
Files 6 7 +1
Lines 73 125 +52
=========================================
+ Hits 72 124 +52
Misses 1 1
Continue to review full report at Codecov.
|
Open
krlmlr
added a commit
that referenced
this pull request
Nov 16, 2017
- `hms()` now works correctly if all four components (days, hours, minutes, seconds) are passed (#49). - Values with durations of over 10000 hours are now printed correctly (#48). - `c()` now returns a hms (#41, @qgeissmann). - Pillar support (#43).
krlmlr
added a commit
that referenced
this pull request
Nov 23, 2017
Breaking changes
----------------
- `as.hms.POSIXt()` now defaults to the current time zone, the previous default was `"UTC"` and can be restored by calling `pkgconfig::set_config("hms::default_tz", "UTC")`.
New features
------------
- Pillar support, will display `hms` columns in tibbles in color on terminals
that support it (#43).
- New `round_hms()` and `trunc_hms()` for rounding or truncating to a given multiple of seconds (#31).
- New `parse_hms()` and `parse_hm()` to parse strings in "HH:MM:SS" and "HH:MM" formats (#30).
- `as.hms.POSIXt()` gains `tz` argument, default `"UTC"` (#28).
- `as.hms.character()` and `parse_hms()` accept fractional seconds (#33).
Bug fixes
---------
- `hms()` now works correctly if all four components (days, hours, minutes, seconds) are passed (#49).
- `hms()` creates a zero-length object of class `hms` that prints as `"hms()"`.
- `hms(integer())` and `as.hms(integer())` both work and are identical to `hms()`.
- Values with durations of over 10000 hours are now printed correctly (#48).
- `c()` now returns a hms (#41, @qgeissmann).
Documentation and error messages
--------------------------------
- Fix and enhance examples in `?hms`.
- Documentation is in Markdown format now.
- Improved error message if calling `hms()` with a character argument (#29).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Requires r-lib/pillar#38.
Test output: https://travis-ci.org/tidyverse/hms/jobs/271835256#L1906