-
Notifications
You must be signed in to change notification settings - Fork 744
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
shiftAll() regression #1496
Comments
Sorry again for the regression, this one is on me. This case is unfortunately not covered by the current tests, so it was not caught. I was under the impression we had enough tests, so I was confident in my solution. Unfortunately this was not true. const duration = Duration.fromObject({years: 100, months: 0, weeks: -1, days: 0}, { conversionAccuracy: 'longterm' });
console.log(duration.normalize().toObject()); |
All good, this is why I have tests :) I'm glad they helped to catch these things! I'm in no hurry to upgrade, v3.3.0 seems to work fine for my needs, I've put a note for myself to try updating again when this gets resolved, cheers! |
Also wanted to mention that doing |
@Maxim-Mazurok Please see the pull request I have created. |
Thank you, the fix works! |
Describe the bug
What used to be
P99Y11M3W2DT10H29M6S
in v3.3.0 is nowP99Y11M3.3481250000000005W
in v3.4.2To Reproduce
You can run it on https://npm.runkit.com/luxon and see the unexpected
{warrantyLeft: "P99Y11M3.3481250000000005W"}
in the output.Actual vs Expected behavior
You can run it on https://npm.runkit.com/luxon and see the expected
{warrantyLeft: "P99Y11M3W2DT10H29M6S"}
in the output.Desktop (please complete the following information):
Additional context
Might be loosely related to #1482 ?
The text was updated successfully, but these errors were encountered: