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? Sign in to your account
From the wiki we get the following different formats to devine a time interval
There are four ways to express a time interval:
I tried to parse this formats with moment.range(...) but only the first interval is parsed correctly. These are my testcyases
moment.range(...)
'2007-03-01T13:00:00Z/2008-05-11T15:30:00Z', moment.range('2007-03-01T13:00:00Z/2008-05-11T15:30:00Z').contains(moment("2007-03-02")), // true moment.range('2007-03-01T13:00:00Z/2008-05-11T15:30:00Z').contains(moment("2007-03-01")), // false moment.range('2007-03-01T13:00:00Z/2008-05-11T15:30:00Z').contains(moment("2008-05-12")), // false "2007-03-01T13:00:00Z/P1Y2M10DT2H30M", moment.range('2007-03-01T13:00:00Z/P1Y2M10DT2H30M').contains(moment("2007-03-02")), // false --> should be TURE! moment.range('2007-03-01T13:00:00Z/P1Y2M10DT2H30M').contains(moment("2007-03-01")), // false moment.range('2007-03-01T13:00:00Z/P1Y2M10DT2H30M').contains(moment("2008-05-12")), "P1Y2M10DT2H30M/2008-05-11T15:30:00Z", moment.range('P1Y2M10DT2H30M/2008-05-11T15:30:00Z').contains(moment("2007-03-02")), // false --> should be TURE! moment.range('P1Y2M10DT2H30M/2008-05-11T15:30:00Z').contains(moment("2007-03-01")), // false moment.range('P1Y2M10DT2H30M/2008-05-11T15:30:00Z').contains(moment("2008-05-12")), // false "P1Y2M10DT2H30M", moment.range('P1Y2M10DT2H30M').contains(moment("2007-03-02")), // false --> should be TURE! moment.range('P1Y2M10DT2H30M').contains(moment("2007-03-01")), // false moment.range('P1Y2M10DT2H30M').contains(moment("2008-05-12")), // false
Demo: https://stackblitz.com/edit/moment-js-ttpb3c?file=src%2Fapp%2Fapp.component.ts
This means that only the first case is supported, but other cases, which are in the standard, are not supported.
The text was updated successfully, but these errors were encountered:
I got this problem too.
And i found PR 259 had been merged. #259
Before release a new version you can implement it in your project. It is easy to implement base on moment.duration (moment version large then v2.3?)
moment.duration
Sorry, something went wrong.
This is still an issue in version 4.0.2
No branches or pull requests
From the wiki we get the following different formats to devine a time interval
There are four ways to express a time interval:
I tried to parse this formats with
moment.range(...)
but only the first interval is parsed correctly.These are my testcyases
Demo: https://stackblitz.com/edit/moment-js-ttpb3c?file=src%2Fapp%2Fapp.component.ts
This means that only the first case is supported, but other cases, which are in the standard, are not supported.
The text was updated successfully, but these errors were encountered: