hms icon indicating copy to clipboard operation
hms copied to clipboard

A simple class for storing time-of-day values

Results 16 hms issues
Sort by recently updated
recently updated
newest added

I feel the result of the comparison with strings is a bit cryptic... ``` r x "20:00:00" #> [1] TRUE TRUE TRUE FALSE # expected x > hms::parse_hms("20:00:00") #> [1]...

`parse_hms()` fails to parse when the time string represents a duration longer than one day. ``` r hms::parse_hms("25:00:00") #> NA # this works readr::parse_time("25:00:00") #> 25:00:00 ``` Created on 2022-07-02...

Hi, in some analyses I frequently need to `cut()` over an `hms` variable and I was wondering if you could find useful having a `cut.hms` method added to the package....

feature

Perhaps I'm missing something but it would be helpful if `unique()` returned an object of class hms ``` r library(hms) unique(hms::as_hms("10:01:01")) #> [1] 36061 ``` Created on 2021-03-08 by the...

``` r late_night Class 'difftime' atomic [1:1] 80405 #> ..- attr(*, "units")= chr "secs" ``` I think you just need to define `Ops.hms` that calls `Ops.difftime` and preserves the hms...

Not sure if this is a dupe of #30, but I'd expect `as_hms` to work without seconds, or at least give an intelligible warning or error. ``` hms::as_hms("08:00") Error in...

Opening this draft for early feedback. Missinng POSIXct and POSIXlt currently. One warning condition (difftime - Date) can't be reproduced exactly using the current implementation. Let me know if that...

Most computations with `hms` drop the class to `difftime` causing worse UX. ``` r hms::hms(10.5) / 2.0 #> Time difference of 5.25 secs `/.hms` Time difference of 20 secs ```...

Would `floor_hms` or `ceiling_hms` be useful? I believe `ceiling_hms` would be in some cases. `floor_hms`, however, is essentially `trunc_hms` except when the values are negative, which I'm not sure is...