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

Temporal.Duration.prototype.{round,total}: Unnecessary call to CreateTemporalDate #2873

Open
anba opened this issue Jun 3, 2024 · 1 comment

Comments

@anba
Copy link
Contributor

anba commented Jun 3, 2024

Temporal.Duration.prototype.round, step 34.d:

Set plainRelativeTo to ! CreateTemporalDate(precalculatedPlainDateTime.[[ISOYear]], precalculatedPlainDateTime.[[ISOMonth]], precalculatedPlainDateTime.[[ISODay]], zonedRelativeTo.[[Calendar]]).

But plainRelativeTo isn't used in later steps (resp. it doesn't matter if it's still undefined or not).

Also applies to the similar steps in Temporal.Duration.prototype.total.

@ptomato
Copy link
Collaborator

ptomato commented Jun 5, 2024

I'd like to revisit this after it's clear whether we have agreement to remove custom calendars. I think this if-clause would go away in that case.

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