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

week n of some month should be a Sunday #29

Open
welch opened this issue Jan 12, 2016 · 0 comments
Open

week n of some month should be a Sunday #29

welch opened this issue Jan 12, 2016 · 0 comments

Comments

@welch
Copy link
Collaborator

welch commented Jan 12, 2016

"week 2 of last month" should be a Sunday, but it is instead the same as the weekday of the first day of that month.

Details:
momentjs knows that weeks start on Sunday. So our grammar constructs that snap to weeks via a moment's "startOf()" method -- eg, "this week", "last week", "week of" -- properly return a Sunday. But something like "week 2 of this month" simply adds a week to the first day of this month (not a Sunday), when it should also round that moment down to an even week start.

Needs a small change to OrdinalOffset in CalendarOffset in the grammar.

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

1 participant