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

Editorial: Rename "normalize" and "unnormalize" for durations #3007

Merged
merged 9 commits into from
Oct 9, 2024

Commits on Oct 8, 2024

  1. Editorial: Fix AOs that no longer return a [[NormalizedDuration]] field

    Here are a couple of stragglers from PR #2943.
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    91ec749 View commit details
    Browse the repository at this point in the history
  2. Editorial: Fix duration record field names

    Another couple of leftovers from PR #2943.
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    33228e7 View commit details
    Browse the repository at this point in the history
  3. Editorial: Rename "normalized duration" to "internal duration"

    "Normalized" was jargon that we adopted after the February 2023 TC39
    meeting. "Internal" is clearer; we convert a Temporal.Duration into an
    "internal" record for calculations.
    
    See: #2953
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    f9566a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    19ea398 View commit details
    Browse the repository at this point in the history
  5. Editorial: Rename UnbalanceDateDurationRelative to DateDurationDays

    This operation used to do more than just calculate the number of days, and
    the name used to make more sense when we had BalanceRelative, etc. Now
    it's just confusing. Rename it to reflect what it does.
    
    See: #2953
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    5988247 View commit details
    Browse the repository at this point in the history
  6. Editorial: Rename Normalized Time Duration to time duration

    A normalized time duration is just a number of nanoseconds; we originally
    planned to convert it to a record with a seconds and subseconds field, but
    that was never needed. So we don't need to have it be a record in the
    first place. Rename it to "time duration" (removing "normalized" for the
    same reason as in the previous commits) and define it as an integer within
    a certain range.
    
    Renames:
    - all of the NormalizedTimeDuration___ operations to just TimeDuration___
    - NormalizeTimeDuration to TimeDurationFromComponents
    - Internal duration [[NormalizedTime]] field to [[Time]]
    - "norm" variables to "timeDuration" or "time" if clear from context
    
    See: #2953
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    457911a View commit details
    Browse the repository at this point in the history
  7. Editorial: Inline TimeDurationSeconds and TimeDurationSubseconds

    We originally planned to convert time durations to a record with a seconds
    and subseconds field, but that was never necessary. Now that they are just
    a mathematical value, we don't need to access them through these seconds
    and subseconds operations.
    
    See: #2953
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    9d1eeeb View commit details
    Browse the repository at this point in the history
  8. Editorial: Merge SubtractTimeDuration into AddTimeDuration

    This previously needed to be a separate operation because you can't just
    negate a record. Now that time durations are a number, you can negate
    them, so no need for a subtraction operation when we already have an
    addition operation.
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    40df1f7 View commit details
    Browse the repository at this point in the history
  9. Editorial: Inline ZeroTimeDuration

    It now just returns 0. No need to have an operation for that.
    
    See: #2953
    ptomato committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    214ee25 View commit details
    Browse the repository at this point in the history