-
-
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
Isoweek bug when customParseFormat is active #2632
Comments
This was referenced May 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When I try to get the iso week number from a date, the isoWeek function is not correct.
Information
Bug has been reproduced in this sandbox
We get a very incoherent value :
dayjs.utc("2024-01-16T22:00:00.000Z").locale("fr").tz("Europe/Paris").isoWeek()
return 3dayjs.utc("2024-01-16T23:00:00.000Z").locale("fr").tz("Europe/Paris").isoWeek()
return 2That makes no sense, if A > B then A.isoWeek() >= B.isoWeek()
I don't really understand what is happening.
My guess is that when time is 23-23h59, the timezone makes the day change from 16 to 17 according to TZ. This day change leads to a decremented isoWeek.
I have tried to remove
customParseFormat
from used plugin and it started working. You can try it on the sandbox. However I need this plugin to make parse date in my TZ.Thanks for your help.
The text was updated successfully, but these errors were encountered: