-
Notifications
You must be signed in to change notification settings - Fork 7k
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
weekYear(Number) jumps to the previous day of the week (and wraps around) #3944
Comments
Looks like a bug to me. Should give the same week number and weekday. Would accept a patch. |
Seems to be an issue in other locales as well. I can repro in 'ca' and 'da' as well locally. |
dayOfYearFromWeeks(year, week, weekday, dow, doy) seems to calculate a wrong
|
Fixes the setting of the wrong weekday under some locales when setting the weekday due to converting it to the local weekday twice. Fixes moment#3944 Signed-off-by: Nikos Filippakis <aesmade@gmail.com>
Fixes the setting of the wrong weekday under some locales when setting the weekday due to converting it to the local weekday twice. Fixes moment#3944 Signed-off-by: Nikos Filippakis <aesmade@gmail.com> Signed-off-by: Nikos Filippakis <nikolaos.filippakis@cern.ch>
I am having the same issue, it behaves as if |
Description of the Issue and Steps to Reproduce:
For the German locale,
weekYear(Number)
does not preserve the day of the week, even ifNumber === weekYear()
. It always jumps to the previous day and wraps around on Sunday.https://jsfiddle.net/mtvsr738/
Environment:
Chrome 57, Firefox 52 and Edge 38 on Windows 10
Other information that may be helpful:
The text was updated successfully, but these errors were encountered: