You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual vs Expected behavior
Expected the second assertion to pass because I added a fractional amount of milliseconds at the end of the second line, but the fourth line dropped the fractional milliseconds. If fractional milliseconds are unsupported, then plus({ milliseconds: .999 }) should throw an exception or (worse) drop the fractional milliseconds from the return value to be consistent with the later minus({ days: 1}).
The text was updated successfully, but these errors were encountered:
Luxon is not designed to work with units smaller than a millisecond or fractional milliseconds. Ideally, this should be enforced and always yield invalid datetimes.
There is no support for sub-millisecond accuracy in the underlying platform (JavaScript) anyways.
Ideally this should also be stated in the docs clearly, if it isn't in there already.
Describe the bug
Fractional milliseconds are dropped by
plus
andminus
.To Reproduce
Actual vs Expected behavior
Expected the second assertion to pass because I added a fractional amount of milliseconds at the end of the second line, but the fourth line dropped the fractional milliseconds. If fractional milliseconds are unsupported, then
plus({ milliseconds: .999 })
should throw an exception or (worse) drop the fractional milliseconds from the return value to be consistent with the laterminus({ days: 1})
.The text was updated successfully, but these errors were encountered: