You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add trunc.IDate (may be replace round.IDate) to consists with lubridate::floor_date. trunc/floor for the week should return first day of the week and not relate with the day of year.
For the "weeks" unit add additional option for the start.on.monday (like cut.Date) or something like this.
@artemklevtsov Sorry for late response. Yes, you are welcome to make PR, although I think it could be improved even further to avoid using POSIXlt and operate only on integer, not even POSIXct. Change will be of course more complex. I think @MichaelChirico used these kid of arithmetic recently when writing datetime parser for fread.
Also when pasting benchmark timings, please align units they are being presented in. Otherwise it is not easy to compare values across rows.
Suggestions
Add
trunc.IDate
(may be replaceround.IDate
) to consists withlubridate::floor_date
.trunc/floor
for the week should return first day of the week and not relate with the day of year.For the "weeks" unit add additional option for the
start.on.monday
(likecut.Date
) or something like this.Possible implementation:
Improvements
For the existing
round.IDate
implementation.Utility function to print bench results:
Data to process.
Weeks
Months
Qurters
Years
Final
trunc.IDate
implementation:Can I make the PR with this changes?
The text was updated successfully, but these errors were encountered: