Skip to content

Conversation

@calcinai
Copy link

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.

@calcinai calcinai force-pushed the patch-negative-dateinteerval branch from 91d3bb9 to cce628f Compare July 22, 2019 07:59
@goetas
Copy link
Member

goetas commented Jul 22, 2019

Hi!
Thanks for your contribution!

Are negative date intervals something standardized?

Asking since apparently is not supported by PHP.

@calcinai
Copy link
Author

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?

@calcinai
Copy link
Author

There’s been some discussion in other projects too: moment/moment#2408

@goetas
Copy link
Member

goetas commented Jul 25, 2019

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.
Can you please?

@calcinai
Copy link
Author

Yep, sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants