Thanks a lot for the helpful package!
x <- lubridate::ymd_hms("2009-08-03 12:01:57.11")
lubridate::round_date(x, "2 mins")
[1] "2009-08-03 12:02:00 UTC"
but
lubridate::round_date(x, "120 secs")
[1] "2009-08-03 12:01:00 UTC"
This is dangerous when handling durations e.g. in seconds, only: when the durations exceeds a minute, the result is unexpected. In this case, at least a warning should be issued.
Thanks a lot for the helpful package!
but
This is dangerous when handling durations e.g. in seconds, only: when the durations exceeds a minute, the result is unexpected. In this case, at least a warning should be issued.