-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support negative DateInterval #12
base: master
Are you sure you want to change the base?
Support negative DateInterval #12
Conversation
91d3bb9
to
cce628f
Compare
Hi! Are negative date intervals something standardized? Asking since apparently is not supported by PHP. |
Reasonable question to ask! I can’t find a concrete answer, but I’ve encountered it more than once. That, and php’s DateInterval can natively represent a negative interval anyway. Arguably a duration is a duration, regardless of direction so I can see it both ways. Thoughts? |
There’s been some discussion in other projects too: moment/moment#2408 |
Sorry for the long feedback loop, was pretty busy in the last days. This can be ok in my opinion and thanks for finding other references to this negative interval behaviors. But for such feature I think we need some tests to ensure does not get removed or broken in the future. |
Yep, sure. |
Excuse the misspelled branch name, but the rest is pretty self explanatory!
ps. That file was mostly psr-2, but I see there are a couple of formatting changes that have come through. Let me know if you'd like them out of this PR.