-
Update Plausible analytics snippet (@jeroenjanssens, #204).
-
Add "Supported By Posit" badge to website (@jeroenjanssens, #187).
- Auto-update from GitHub Actions (#202).
-
Fix comment (#200).
-
Tweaks (#199).
-
Test all R versions on branches that start with cran- (#198).
- Install binaries from r-universe for dev workflow (#196).
- Fix reviewdog and add commenting workflow (#194).
- Sync (#192).
- Sync (#190).
-
Merge tag 'v1.1.4'.
-
Sub-second value parsing accurately (@eitsupi, #127, #128).
-
is.hms()andas.hms()now warn even when called indirectly (@moodymudskipper, #121, #163). -
Implement
ceiling_hms()andfloor_hms()(@moodymudskipper, #118, #160). -
Parsing now holds the date part fixed, removing unlikely errors during clock wraparound.
-
Spring cleaning (@schochastics, #174, #175).
-
Use rlang instead of ellipsis (#106).
- CRAN release v1.1.4 (#185).
-
Sub-second value parsing accurately (@eitsupi, #127, #128).
-
is.hms()andas.hms()now warn even when called indirectly (@moodymudskipper, #121, #163). -
Implement
ceiling_hms()andfloor_hms()(@moodymudskipper, #118, #160).
- Parsing now holds the date part fixed, removing unlikely errors during clock wraparound.
-
Spring cleaning (@schochastics, #174, #175).
-
Use rlang instead of ellipsis (#106).
- Fix method consistency, checked by R-devel.
- Use rlang instead of ellipsis (#106).
- Re-rendered documentation for compatibility with R-devel.
- Avoid blanket import for lifecycle package for compatibility with upcoming rlang.
- Establish compatibility with development version of testthat (#101, @lionel-).
"hms"objects no longer have a common type withcharacterandnumeric. Combining such values previously threw a warning, now throws an error (#94).vec_cast()andas_hms()throw error instead of a warning if input can't be parsed (#68).
- New
unique.hms()method (#98, @joethorley). as_hms()is a generic again (#81).
- Avoid
LazyDatainDESCRIPTION. - Bump required versions of ellipsis and vctrs to avoid warning during package load.
- Using lifecycle package (#94).
- hms is now marked as "stable".
"hms"objects no longer have a common type withcharacterandnumeric. Combining such values previously threw a warning, now throws an error (#94).vec_cast()andas_hms()now throw error instead of a warning if input can't be parsed (#68).
as_hms()is a generic again (#81).round_hms()andtrunc_hms()gaindigitsargument (#78, @hglanz).
as_hms()andvec_cast()now correctly treat objects of class"difftime"withintegermode (#84).
- Using lifecycle package (#94).
- hms has been re-licensed as MIT (#86).
- Use
vec_default_ptype2(), removevec_ptype2.hms.unspecified()(#80, @romainfrancois). vec_ptype2.hms.default()forwards tovec_default_ptype2()for compatibility with vctrs 0.2.1.- Remove
as.data.frame.hms(), handeld by vctrs.
- Internal changes only.
- Work around parsing error that occurs on DST changeover dates (https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16764).
- Lossy casts from
charactervectors tohmsnow also trigger a warning if the cast succeeds in the first element of the vector but fails for other elements.
-
Now based on vctrs >= 0.2.0 (#61). This adds support for
vec_cast()andvec_ptype2(). Some operations (such as subset assignment) are now stricter. Thenew_hms()constructor permits safe construction ofhmsobjects from a numeric vector. -
The new
is_hms()deprecates the existingis.hms().as.hms()is deprecated in favor ofvec_cast()or the newas_hms()(which is just a thin wrapper aroundvec_cast()).
-
Always show seconds in a pillar if they are different from zero (#54).
-
Values with nonzero hours, seconds and split-seconds are now displayed correctly in tibbles (#56), even with a very small distance to the full second (#64).
- Don't test colored output on CRAN.
- Correct reference link on r4ds (#58, @evanhaldane).
- Adapted tests to pillar 1.2.1.
- Preserve
NAwhen converting tocharacter(#51, @jeroen). - Adapted tests to pillar 1.1.0.
as.hms.POSIXt()now defaults to the current time zone, the previous default was"UTC"and can be restored by callingpkgconfig::set_config("hms::default_tz", "UTC").
- Pillar support, will display
hmscolumns in tibbles in color on terminals that support it (#43). - New
round_hms()andtrunc_hms()for rounding or truncating to a given multiple of seconds (#31). - New
parse_hms()andparse_hm()to parse strings in "HH:MM:SS" and "HH:MM" formats (#30). as.hms.POSIXt()gainstzargument, default"UTC"(#28).as.hms.character()andparse_hms()accept fractional seconds (#33).
hms()now works correctly if all four components (days, hours, minutes, seconds) are passed (#49).hms()creates a zero-length object of classhmsthat prints as"hms()".hms(integer())andas.hms(integer())both work and are identical tohms().- Values with durations of over 10000 hours are now printed correctly (#48).
c()now returns a hms (#41, @qgeissmann).
- Fix and enhance examples in
?hms. - Documentation is in Markdown format now.
- Improved error message if calling
hms()with a character argument (#29).
- Fix
lubridatetest for compatibility with 1.6.0 (#23, @vspinu). - NA values are formatted as
NA(#22).
Minor fixes and improvements.
- Subsetting keeps
hmsclass (#16). format.hms()right-justifies the output by padding with spaces from the left,as.character.hms()remains unchanged.- Times larger than 24 hours or with split seconds are now formatted correctly (#12, #13).
- Sub-second part is printed with up to six digits, for even smaller values trailing zeros are shown (#17).
First CRAN release.
- Values are stored as a numeric vector that contains the number of seconds
since midnight.
- Inherits from
difftimeclass. - Updating units is a no-op, anything different from
"secs"issues a warning.
- Inherits from
- Supports construction from time values, coercion to and from various data
types, and formatting.
- Conversion from numeric treats input as seconds.
- Negative times are formatted with a leading
-.
- Can be used as a regular column in a data frame.
- Full test coverage.
- Test for arithmetic with
Date,POSIXtandhmsclasses. - Test basic compatibility with
lubridatepackage (#5).
- Test for arithmetic with
- Interface:
hms()(with rigorous argument checks)as.hms()forcharacter,numeric,POSIXctandPOSIXltas.xxx.hms()forcharacter,numeric(implicitly),POSIXctandPOSIXltis.hms()as.data.frame.hms()(forwards toas.data.frame.difftime())format.hms()print.hms()(returns unchanged input invisibly)