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
dddd always returns dow
after using updateLocale
#3121
Labels
Comments
I found a workaround, this just works fine: moment().day('Saturday').weekday(); // 0
moment().day('Sunday').weekday(); // 1 |
Yep, that's not right. moment.updateLocale('en', { week: { dow: 6 } });
moment.locale('en');
moment('Tuesday', 'dddd').format()
"2016-01-01T00:00:00-06:00" //this is a friday Things start to work if I specify the |
Closing this in favor of #3137 and #3235, I just ran this example with the PR and it produces (correctly): > moment.updateLocale('en', { week: { dow: 6 } })
...
> moment.locale('en');
'en'
> moment('Sunday', 'dddd').weekday();
1
> moment('Friday', 'dddd').weekday();
6
> moment('Monday', 'dddd').weekday();
2 |
@ichernev alright, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
There's something pretty weird with
updateLocale
and settingweek: { dow: 6 }
.The text was updated successfully, but these errors were encountered: