-
-
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
Duration is wrong on 1.11.10 #2464
Comments
Any update on this error? |
@iamkun @sanjaynishad can this behaviour be caused by #2362? |
@pvds I don't think, because duration was broken in #2479 when I tried this with
I got
I'll try to investigate more on this |
Issue is caused by wrong parsing from milliseconds
because there is used wrong constant for months:
This means that one month is 30.41666 days long, causing problems for duration bigger than 1 month |
Got curious and did some research. According to this version of ISO 8601 doc: I believe this favors the original implementation of |
looks like #2583 addresses this issue with missing weeks handling |
Still happening with v1.11.13. Here's a simple use case performed right from the console on the dayjs website:
output:
|
Describe the bug
The duration is wrong.
Let's take this example
With dayjs 1.11.09, we get 'P2M10DT1H'
With dayjs 1.11.10 we get 'P2M9DT5H' which I don't even understand
Expected behavior
Previous behavior is right
Information
The text was updated successfully, but these errors were encountered: