-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
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? Sign in to your account
Floor / Ceil methods for Number and Period Inconsistency #34782
Comments
Out of curiosity, what has changed that the arguments against this proposal from #18574 are no longer valid? |
I think just people keep getting confused by the order... Would it be too bad to have both methods?
|
As I already posted in #34810 (comment) I'm thinking that the original considerations in #18574 were right and the current behaviour is not inconsistent but missing functionality. It can be seen easily if we add a function which can round to a period while converting the time type: round(Date, now(), Month, RoundUp) == Date(2020, 4) #at least for the month of the post 😄 Tl;Dr: rather add those missing functions and make only the 2nd argument a required one |
I'd like to work on this, if I understand this correctly, we'd like the following to pass as tests in the end?
|
I just noticed that the
floor
/ceil
methods forNumber
andPeriod
have the positional arguments inverted.From Slack, Dates should be consistent with Base.
Related: #18574
The text was updated successfully, but these errors were encountered: