Skip to content
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

.all() recurrences are wrong if startDate is 31st day of month #91

Open
welmor opened this issue Jan 17, 2019 · 2 comments
Open

.all() recurrences are wrong if startDate is 31st day of month #91

welmor opened this issue Jan 17, 2019 · 2 comments

Comments

@welmor
Copy link

welmor commented Jan 17, 2019

In the current scenario:
startDate: '2018-12-31'
endDate: '2019-12-31'

moment().recur('2018-12-31', '2019-12-31').every(1, 'months').except('2018-12-31').all()

A monthly recurrence for the above should return 12 records, but returns 7 instead.

Between those dates (excluding the first occurrence), there are 7 months ending with 31st (january, march, may, july, august, october, december).

@welmor welmor changed the title .all() recurrences are wrong if startDate is 31st day .all() recurrences are wrong if startDate is 31st day of month Jan 17, 2019
@Maweypeyyu
Copy link

That's also true for .next(x) calls.

@andydev404
Copy link

Same here, any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants