-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normative: Throw on conversion from TimeZone to Calendar and vice versa
In order to prevent bugs like `new Temporal.ZonedDateTime(0n, cal, tz)` (where the calendar and time zone arguments are switched, silently poisoning the object) ToTemporalCalendar should throw if it encounters a Temporal.TimeZone instance, and ToTemporalTimeZone should throw if it encounters a Temporal.Calendar instance. Includes implementation in the reference code. Co-authored-by: Aditi <[email protected]> Closes: #2354
- Loading branch information
Showing
3 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters