tidyverse / hms

A simple class for storing time-of-day values
https://hms.tidyverse.org/
Other
138 stars 25 forks source link

parse_hms() fails to parse when the duration is longer than one day #107

Open yutannihilation opened 2 years ago

yutannihilation commented 2 years ago

parse_hms() fails to parse when the time string represents a duration longer than one day.

hms::parse_hms("25:00:00")
#> NA

# this works
readr::parse_time("25:00:00")
#> 25:00:00

Created on 2022-07-02 by the reprex package (v2.0.1)

I guess this is the limitation of using strptime(), so I have no idea if this can be fixed.

https://github.com/tidyverse/hms/blob/76063a88f22ef9bcff7d9980b4038b8b4a72de89/R/parse.R#L32