Closed randomgambit closed 7 years ago
This looks like a duplicate of #28.
Ha! OK sorry about that. Well that gives you a practical example of how people use these packages! ;-)
Indeed. Does my proposed fix to lubridate work for you?
I think it makes totally sense.
People a more likely to know about lubridate
than hms
.
If I were you, I would include all of the hms
functions into lubridate
directly so that you have a unique package that handles dates and times at the same time (ha ha).
Thanks. It would be helpful if you could comment at the lubridate PR. Originally, hms was conceived as a lightweight package to store time-of-day or duration data as a number of seconds, and print it nicely. The lubridate package has much better tools for handling this kind of data.
what do you mean comment at the lubridate PR? posting on the lubridate github?
I see your point of keeping hms
as lightweight as possible, but consider the very frequent setting where someone works with intraday timestamped data, and needs to filter data between some business hours every day. Using hms(timestamp) > hms('09:30')
is a natural way to do so. The horrible way to do so is to extract the time part of a timestamp (in string format) and compare to > '09:30:00'
Right now, lubridate does not have a good support for time of day and that is why I think both packages are complementary. Ultimately, they could be combined into one (in the same fashion as in Pandas) but this is a matter of taste.
Could you comment at https://github.com/hadley/lubridate/pull/538? You could also install this PR via devtools::install_github("hadley/lubridate#538")
, or download/clone from https://github.com/krlmlr/lubridate/tree/f-hms.
Happy to discuss further improvements of time-of-day handling there.
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.
Hello everyone,
Thanks again for this nice package. Consider this
Why does
hms
returns the wrong time? It returns theGMT
time instead ofEST
, although you can see thatest_time
is correctly converted.Thanks for your help!