Skip to content

To specify necessary details about era, eraYear and monthCode usage with Temporal in internationalization setting (for calendars other than "iso8601").

License

Notifications You must be signed in to change notification settings

tc39/proposal-intl-era-monthcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intl era and monthCode Proposal

(old name "Intl Temporal Proposal")

To specify necessary details about era, eraYear and monthCode usage with Temporal in internationalization setting (for calendars other than "iso8601").

Stage - Stage 2

This proposal is advanced to Stage 2 for ECMA402 during the TC39 meeting, Feb 1 2023. (Link to be added after the meeting notes is approved by TC39 in March) This proposal is advanced to Stage 1 for ECMA402 during the TC39 meeting, Dec 1 2022.

Stage 3 Reviwers

During the Feb 1 2023 TC39 meeting, the following members agree to serve as the Stage 3 Reviewers of this proposal:

  • EAO (Eemeli Aro) from Mozilla
  • SFC (Shane Carr) from Google

Presentation:

References:

Scope

Temporal proposal is a ECMA262 Stage proposal to “provide standard objects and functions for working with dates and times.” The Temporal proposal specification text clearly specified how the “iso8601” Calendar and “UTC” TimeZone should behave as well as define name and some basic aspect of Calenders other than “iso8601” and TimeZone other than “UTC”. However, there are additional requirements needed for implementation purposes. This proposal aims to define these details which should be eventually merged into ECMA402 specification.

Abstract Operations in Temporal proposal to be specified

We believe the following Abstract Opertaions defined in the Temporal proposal need to be defined in more details in this proposal:

We may choose to specify certain calendar arithmetic for some calendars if they are very simple to conver from/to "iso8601" calendar- For example, for "gregory", "roc", "buddhist", "japanese" calendar, but leave the arithmetic in vague language for others.

We are NOT aiming to specify the calendar arithmetic for the following part of Temporal proposal:

  • 15.6.1.8 CalendarDateYear ( calendar, date )
  • 15.6.1.11 CalendarDateDay ( calendar, date )
  • 15.6.1.12 CalendarDateDayOfWeek ( calendar, date )
  • 15.6.1.13 CalendarDateDayOfYear ( calendar, date )
  • 15.6.1.14 CalendarDateWeekOfYear ( calendar, date )
  • 15.6.1.15 CalendarDateDaysInWeek ( calendar, date )
  • 15.6.1.16 CalendarDateDaysInMonth ( calendar, date )
  • 15.6.1.17 CalendarDateDaysInYear ( calendar, date )
  • 15.6.1.18 CalendarDateMonthsInYear ( calendar, date )
  • 15.6.1.19 CalendarDateInLeapYear ( calendar, date )

Calendars

Values of Era for Calendars

Related spec text in Temporal proposal:

For Calendar:

  • List of 'calendar': CLDR and ICU support the following calendars beside "iso8601" and currently supported by Intl.DateTimeFormat API in different browsers.

    • "gregory""
    • "roc" (same as "gregory" except handling of era and year)
    • "buddhist" (same as "gregory" except handling of era and year)
    • "japanese" (same as "gregory" except handling of era and year)
    • "persian"
    • "coptic"
    • "ethiopic"
    • "ethiopic-ameta-alem" (same as "ethiopic" except handling of era and year)
    • "indian""
    • "hebrew"
    • "chinese"
    • "dangi" (same as "chinese" except the referencing timeZone)
    • "islamic"
    • "islamic-tbla"
    • "islamic-umalqura"
    • "islamic-civil"
  • Requirement for era and eraYear:

    • The combination of era and eraYear in a calendar need to be able to uniquely identify a particular year in the timeline.
    • era need to be a String (per 15.6.1.1 CalendarEra in Temporal).
    • eraYear need to be an Integer (per 15.6.1.2 CalendarEraYear in Temporal).
    • If there is only one era in a calendar, we do not need to and should avoid using the era/eraYear in that calendar (e.g. "hebrew", "persian")
    • If we define era, we need to also define the behavior if the field(s) is/are absent. (fallback to use year or fallback to a default value and what is the default value)
  • 'gregory': TBW

Values of EraYear for Calendars

Related spec text in Temporal proposal:

For Calendar:

  • 'gregory': TBW

Values of Month for Calendars

Related spec text in Temporal proposal: *

For Calendar:

  • 'gregory': TBW

Values of MonthCode for Calendars

Related spec text in Temporal proposal: *

For Calendar:

  • 'gregory': TBW

About

To specify necessary details about era, eraYear and monthCode usage with Temporal in internationalization setting (for calendars other than "iso8601").

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages