-
Notifications
You must be signed in to change notification settings - Fork 154
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
Consider renaming NormalizeDuration and UnnormalizeDuration #2953
Comments
Also consider renaming UnbalanceDateDurationRelative, which may also be confused with "balanced" durations. |
Meeting 2024-10-03: Rename the following
|
It completely escaped me when we discussed this, that non-normalized Duration Records are no longer a thing since #2943. We just use Temporal.Duration in that case. So no need for Public Duration Record. Instead of ToPublicDurationRecord, I propose renaming UnnormalizeDuration to TemporalDurationFromInternal. Sound good? |
Sounds good! |
"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
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
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
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
It now just returns 0. No need to have an operation for that. See: #2953
"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
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
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
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
It now just returns 0. No need to have an operation for that. See: #2953
(the referenced comment is this:)
Originally posted by @justingrant in #2944 (comment)
The text was updated successfully, but these errors were encountered: