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: Remove relativeTo option from Duration.p.add/subtract #2841

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented May 15, 2024

This is part of the ongoing effort, at implementations' request, to reduce the code size and complexity of the proposal.

Removes the options parameter from Temporal.Duration.prototype.add and Temporal.Duration.prototype.subtract. Everything else remains the same: Additions and subtractions that previously succeeded without relativeTo, still succeed, with the same results. Additions and subtractions that previously threw if there was no relativeTo, now just throw unconditionally.

Closes: #2825

Removes the options parameter from Temporal.Duration.prototype.add and
Temporal.Duration.prototype.subtract. Everything else remains the same:
Additions and subtractions that previously succeeded without relativeTo,
still succeed, with the same results. Additions and subtractions that
previously threw if there was no relativeTo, now just throw
unconditionally.

Closes: #2825
@ptomato
Copy link
Collaborator Author

ptomato commented May 15, 2024

To be presented at the June 2024 TC39 meeting. Marking as draft until then.

Tests are in tc39/test262#4081.

@ptomato ptomato marked this pull request as draft May 15, 2024 19:15
@ptomato ptomato mentioned this pull request May 15, 2024
75 tasks
@arshaw
Copy link
Contributor

arshaw commented May 16, 2024

This looks great to me

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

Successfully merging this pull request may close these issues.

Remove options parameter from Duration.p.add/subtract
2 participants