tc39 / proposal-temporal

Provides standard objects and functions for working with dates and times.
https://tc39.es/proposal-temporal/docs/
Other
3.19k stars 146 forks source link

CalendarResolveFields: Inconsistent field checked too early and wrong error type? #2866

Open anba opened 1 month ago

anba commented 1 month ago

CalendarResolveFields has the following two requirements:

The operation throws a TypeError exception if the properties of fields are internally inconsistent within the calendar or insufficient to identify a unique instance of type in the calendar. For example:

  • If "month" and "monthCode" in the calendar have interpretations analogous to ISO 8601 and either the corresponding values for both are undefined or neither value is undefined but they do not identify the same month. ...
  • If type is date or year-month and [...] the values for "era" and "eraYear" do not together identify the same year as the value for "year".

Questions:

justingrant commented 1 month ago

Meeting 2024-05-30: @gibson042 to follow up and propose behavior here.