Skip to content
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

Normative: Disallow rounding to increment while balancing to calendar unit #2916

Merged
merged 2 commits into from
Sep 5, 2024

Commits on Sep 5, 2024

  1. 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
    ptomato committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    52c45f5 View commit details
    Browse the repository at this point in the history
  2. Update test262

    ptomato committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    6f175b5 View commit details
    Browse the repository at this point in the history