Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normative: Disallow rounding to increment while balancing to calendar…
… unit The corner case of rounding to a >1 increment of a calendar smallest unit while simultaneously balancing to a larger calendar unit is ambiguous. This use case was probably never considered. const d1 = Temporal.Duration.from({months: 9}); d1.round({ relativeTo: '2024-01-01', largestUnit: 'years', smallestUnit: 'months', roundingIncrement: 8, roundingMode: 'ceil', }); // => 1 year? 1 year 4 months? This never came up in real-world usage. Disallow it explicitly, to leave space for a future proposal if it ever comes up. Closes: #2902
- Loading branch information