We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Step 16.b:
Set remainder to remainder(roundedFractionalDays, 1) × nsPerDay.
Step 17:
Let resultDuration be ? CreateNormalizedDurationRecord(duration.[[Years]], duration.[[Months]], duration.[[Weeks]], days, remainder).
But CreateNormalizedDurationRecord requires remainder to be a Normalized Time Duration Record.
CreateNormalizedDurationRecord
remainder
Do we actually need to use remainder in step 16.b? Implementation-wise it seems easier to subtract from roundedNorm to compute the remainder:
roundedNorm
Set remainder to ! SubtractNormalizedTimeDuration(roundedNorm, NormalizeTimeDuration(roundedWholeDays * HoursPerDay, 0, 0, 0, 0, 0)).
This will also allow to simplify steps 8-9:
Let roundedFractionalDays be DivideNormalizedTimeDuration(roundedNorm, nsPerDay). Let roundedWholeDays be truncate(roundedFractionalDays).
to just:
Let roundedWholeDays be truncate(DivideNormalizedTimeDuration(roundedNorm, nsPerDay)).
where truncate division matches integer division, which will likely be used by implementations for these steps.
The text was updated successfully, but these errors were encountered:
Editorial: Use Anba's suggested simplification in NudgeToDayOrTime
a3cc9f7
roundedFractionalDays/roundedDaysRemainder isn't needed, and would be more of a hassle for implementations to calculate anyway. Closes: #2889
ptomato
No branches or pull requests
Step 16.b:
Step 17:
But
CreateNormalizedDurationRecord
requiresremainder
to be a Normalized Time Duration Record.Do we actually need to use
remainder
in step 16.b? Implementation-wise it seems easier to subtract fromroundedNorm
to compute the remainder:This will also allow to simplify steps 8-9:
to just:
where truncate division matches integer division, which will likely be used by implementations for these steps.
The text was updated successfully, but these errors were encountered: