Open Balkonskii opened 5 months ago
Describe the bug Incorrect value when shifting the duration of days and months to years. For duration Duration.fromObject({ months: 12, days: 730 }) when using shiftTo and normalize, an incorrect value is returned.
Duration.fromObject({ months: 12, days: 730 })
shiftTo
normalize
To Reproduce https://stackblitz.com/edit/jrxvkk?file=src%2Fapp%2Fapp.component.ts,package.json
Actual vs Expected behavior Actual is { "years": 3, "months": 0, "days": 10, "hours": 0, "minutes": 0, "seconds": 0, "milliseconds": 0 }. Expected is { "years": 3 }.
{ "years": 3, "months": 0, "days": 10, "hours": 0, "minutes": 0, "seconds": 0, "milliseconds": 0 }
{ "years": 3 }
Desktop (please complete the following information):
Additional context Found it in unit test in my app. On luxon@3.4.1 it's pass, but from luxon@3.4.2 it's broken.
luxon@3.4.1
luxon@3.4.2
Describe the bug Incorrect value when shifting the duration of days and months to years. For duration
Duration.fromObject({ months: 12, days: 730 })
when usingshiftTo
andnormalize
, an incorrect value is returned.To Reproduce https://stackblitz.com/edit/jrxvkk?file=src%2Fapp%2Fapp.component.ts,package.json
Actual vs Expected behavior Actual is
{ "years": 3, "months": 0, "days": 10, "hours": 0, "minutes": 0, "seconds": 0, "milliseconds": 0 }
. Expected is{ "years": 3 }
.Desktop (please complete the following information):
Additional context Found it in unit test in my app. On
luxon@3.4.1
it's pass, but fromluxon@3.4.2
it's broken.