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

RoundDuration: Use truncate(fractionalDays) instead of truncate(days) #2685

Closed
anba opened this issue Sep 25, 2023 · 1 comment
Closed

RoundDuration: Use truncate(fractionalDays) instead of truncate(days) #2685

anba opened this issue Sep 25, 2023 · 1 comment
Assignees

Comments

@anba
Copy link
Contributor

anba commented Sep 25, 2023

Step 7.k:

Let wholeDaysDuration be ? CreateTemporalDuration(0, 0, 0, truncate(days), 0, 0, 0, 0, 0, 0).

But days has already been set to zero in step 4.d. Instead the step should be:

Let wholeDaysDuration be ? CreateTemporalDuration(0, 0, 0, truncate(fractionalDays), 0, 0, 0, 0, 0, 0).

@ptomato ptomato self-assigned this Sep 25, 2023
@ptomato
Copy link
Collaborator

ptomato commented Sep 25, 2023

As usual, thanks for spotting this. It's probably a rebase error. It's already being fixed in #2671 (commit "Normative: Avoid calendar operations when adding days-only duration to PlainDate") so I'll leave this alone for now.

ptomato added a commit that referenced this issue Sep 26, 2023
…o PlainDate

In a few places, we called CalendarDateAdd with a days-only duration.
For days-only, it's not necessary to consult the calendar: we can just
add the days in the ISO calendar space to the ISO calendar values in the
internal slots.

(also fixes a rebase error with truncate(_fractionalDays_))
Closes: #2685
ptomato added a commit that referenced this issue Sep 26, 2023
…o PlainDate

In a few places, we called CalendarDateAdd with a days-only duration.
For days-only, it's not necessary to consult the calendar: we can just
add the days in the ISO calendar space to the ISO calendar values in the
internal slots.

(also fixes a rebase error with truncate(_fractionalDays_))
Closes: #2685
ptomato added a commit that referenced this issue Sep 27, 2023
…o PlainDate

In a few places, we called CalendarDateAdd with a days-only duration.
For days-only, it's not necessary to consult the calendar: we can just
add the days in the ISO calendar space to the ISO calendar values in the
internal slots.

(also fixes a rebase error with truncate(_fractionalDays_))
Closes: #2685
ptomato added a commit that referenced this issue Oct 4, 2023
…o PlainDate

In a few places, we called CalendarDateAdd with a days-only duration.
For days-only, it's not necessary to consult the calendar: we can just
add the days in the ISO calendar space to the ISO calendar values in the
internal slots.

(also fixes a rebase error with truncate(_fractionalDays_))
Closes: #2685
@ptomato ptomato closed this as completed in 1ff91a9 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants