tidyverse / hms

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

Addition respects 24hour cycles #59

Closed DocEd closed 5 years ago

DocEd commented 6 years ago

Would it be useful to have a modification that permitted hms objects to roll over at 24 hour boundaries? For example

22:00:00 + 03:00:00 = 01:00:00

At the moment it equals 25:00:00

I have a specific case use at the moment that would make this adjustment incredibly useful.

krlmlr commented 5 years ago

Thanks. This is not how the underlying "difftime" class works. Can you use "regular" date-times and extract the time-of-day part? Alternatively, you could use as.hms(as.numeric(x) %% 86400) .

github-actions[bot] commented 3 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.