-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
weekOfYear shows wrong calender week at the turn of the year #1264
Comments
Hi, have you set the correct locale? |
yes, it is the same issue when i set 'us' | 'de' |
@iamkun I have the same issue. |
You can use will update some other locale like |
I have this same issue. Using |
@Uninen a reproduction demo please? you can share your code here https://runkit.com/npm/dayjs |
Sure, here: https://runkit.com/embed/5wk28cq51vf9 (Note, the dates here are dynamic so this example may or may not work in the future.) Week for Mon Dec 28 2020 returns 1 (should be 53), week for Sun Jan 10 2021 returns 3 (should be 1) using locale |
@Uninen this is because you haven't load |
Oh! 🤦♂️ Thanks, it works with Sorry about the noise. I missed the import as there were no errors or even TypeScript hints with the locale-call even though it wasn't imported. |
## [1.10.3](v1.10.2...v1.10.3) (2021-01-09) ### Bug Fixes * fix customParseFormat plugin strict mode parse meridiem bug ([#1321](#1321)) ([e49eeef](e49eeef)) * fix weekYear plugin missing locale bug ([#1319](#1319)) ([344bdc0](344bdc0)), closes [#1304](#1304) * update advancedFormat plugin to add format options for iso week and weekyear ([#1309](#1309)) ([2c54c64](2c54c64)) * update devHelper to add dev warning setting locale before loading ([c5cc893](c5cc893)) * update German [de] locale yearStart ([1858df8](1858df8)), closes [#1264](#1264)
🎉 This issue has been resolved in version 1.10.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@iamkun What about the default locale en? |
## [1.10.3](iamkun/dayjs@v1.10.2...v1.10.3) (2021-01-09) ### Bug Fixes * fix customParseFormat plugin strict mode parse meridiem bug ([#1321](iamkun/dayjs#1321)) ([e49eeef](iamkun/dayjs@e49eeef)) * fix weekYear plugin missing locale bug ([#1319](iamkun/dayjs#1319)) ([344bdc0](iamkun/dayjs@344bdc0)), closes [#1304](iamkun/dayjs#1304) * update advancedFormat plugin to add format options for iso week and weekyear ([#1309](iamkun/dayjs#1309)) ([2c54c64](iamkun/dayjs@2c54c64)) * update devHelper to add dev warning setting locale before loading ([c5cc893](iamkun/dayjs@c5cc893)) * update German [de] locale yearStart ([1858df8](iamkun/dayjs@1858df8)), closes [#1264](iamkun/dayjs#1264)
## [1.10.3](iamkun/dayjs@v1.10.2...v1.10.3) (2021-01-09) ### Bug Fixes * fix customParseFormat plugin strict mode parse meridiem bug ([#1321](iamkun/dayjs#1321)) ([e49eeef](iamkun/dayjs@e49eeef)) * fix weekYear plugin missing locale bug ([#1319](iamkun/dayjs#1319)) ([344bdc0](iamkun/dayjs@344bdc0)), closes [#1304](iamkun/dayjs#1304) * update advancedFormat plugin to add format options for iso week and weekyear ([#1309](iamkun/dayjs#1309)) ([2c54c64](iamkun/dayjs@2c54c64)) * update devHelper to add dev warning setting locale before loading ([c5cc893](iamkun/dayjs@c5cc893)) * update German [de] locale yearStart ([1858df8](iamkun/dayjs@1858df8)), closes [#1264](iamkun/dayjs#1264)
## [1.10.3](iamkun/dayjs@v1.10.2...v1.10.3) (2021-01-09) ### Bug Fixes * fix customParseFormat plugin strict mode parse meridiem bug ([#1321](iamkun/dayjs#1321)) ([e49eeef](iamkun/dayjs@e49eeef)) * fix weekYear plugin missing locale bug ([#1319](iamkun/dayjs#1319)) ([344bdc0](iamkun/dayjs@344bdc0)), closes [#1304](iamkun/dayjs#1304) * update advancedFormat plugin to add format options for iso week and weekyear ([#1309](iamkun/dayjs#1309)) ([2c54c64](iamkun/dayjs@2c54c64)) * update devHelper to add dev warning setting locale before loading ([c5cc893](iamkun/dayjs@c5cc893)) * update German [de] locale yearStart ([1858df8](iamkun/dayjs@1858df8)), closes [#1264](iamkun/dayjs#1264)
Describe the bug
The 2020-12-30 should be calender week 53 but it shows as calender week 1.
(similar issue: #760)
Calender weeks:
http://www.whatweekisit.org/
Information
Day.js Version 1.9.7
Browser Chrome latest
The text was updated successfully, but these errors were encountered: