We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
floor_date(now(), "2 weeks")
The text was updated successfully, but these errors were encountered:
[#442] Implement new q format for quarters
was looking for similar functionality for rounding dates, e.g. round_date(x, "5 minutes")
round_date(x, "5 minutes")
Sorry, something went wrong.
I have implemented this and added quite some tests, but would really appreciate if you guys could play with it a bit and run your own checks on corner cases.
Multiple of all units excepts weeks are supported (updating on weeks is not supported by POSIXlt) . Rounding on units that don't have a meaningful 0 (days and months) happens incrementally from 1:
> floor_date(ymd("2016-08-02"), "2 days")
> floor_date(ymd("2016-08-03"), "2 days")
This is consistent with how currently bimonthly, quarter and halfyear behave.
No branches or pull requests