-
Notifications
You must be signed in to change notification settings - Fork 79
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
24.hour.millis get 86400000 but 1.day.millis get 0 #86
Comments
Hi. The above behavior is confusable. But I think it's intended behavior. See below: |
But I guess, whether this behaviour is intended or not, it should be in a Spec-like test somewhere (don't know if it already is) so people can see the expected behaviour. |
I agree that Essentially problem is there is no way of representing We should provide another DSL what builds |
Ah, OK, now I get it: I wonder, what could be done to make this not as confusing as it is right now to users. The DSL should definitely make it clear whether you get a duration or a period, while the user still has to figure out the exact differences between the two for herself/himself. // compiles
1.period.day
24.duration.hours
// does not compile
1.duration.day This would help although it feels a bit more clumsy. I guess, tradeoff between concise DSL vs. clearer DSL. I vote to change the DSL because the issue not only entails user confusion but even erroneous apps / libs because of the wrong assumption that |
code
results:
The text was updated successfully, but these errors were encountered: