diff --git a/spec/annexes.html b/spec/annexes.html index dc252267..e0c62492 100644 --- a/spec/annexes.html +++ b/spec/annexes.html @@ -15,9 +15,6 @@

Implementation Dependent Behaviour

  • The default locale ()
  • -
  • - The default time zone () -
  • The set of available locales for each constructor ()
  • diff --git a/spec/datetimeformat.html b/spec/datetimeformat.html index 24c70e7c..00b59308 100644 --- a/spec/datetimeformat.html +++ b/spec/datetimeformat.html @@ -94,9 +94,18 @@

    1. Set _timeZone_ to DefaultTimeZone(). 1. Else, 1. Set _timeZone_ to ? ToString(_timeZone_). - 1. If the result of IsValidTimeZoneName(_timeZone_) is *false*, then - 1. Throw a *RangeError* exception. + 1. If IsTimeZoneOffsetString(_timeZone_) is *true*, then + 1. Let _parseResult_ be ParseText(StringToCodePoints(_timeZone_), |UTCOffset|). + 1. Assert: _parseResult_ is a Parse Node. + 1. If _parseResult_ contains more than one |MinuteSecond| Parse Node, throw a *RangeError* exception. + 1. Let _offsetNanoseconds_ be ParseTimeZoneOffsetString(_timeZone_). + 1. Let _offsetMinutes_ be _offsetNanoseconds_ / (6 × 1010). + 1. Assert: _offsetMinutes_ is an integer. + 1. Set _timeZone_ to FormatOffsetTimeZoneIdentifier(_offsetMinutes_). + 1. Else if IsValidTimeZoneName(_timeZone_) is *true*, then 1. Set _timeZone_ to CanonicalizeTimeZoneName(_timeZone_). + 1. Else, + 1. Throw a *RangeError* exception. 1. Set _dateTimeFormat_.[[TimeZone]] to _timeZone_. 1. Let _formatOptions_ be a new Record. 1. Set _formatOptions_.[[hourCycle]] to _hc_. @@ -164,6 +173,27 @@

    1. Return _dateTimeFormat_. + + +

    + FormatOffsetTimeZoneIdentifier ( + _offsetMinutes_: an integer, + ): a String +

    +
    +
    description
    +
    + It formats a UTC offset, in minutes, into a UTC offset string formatted like ±HH:MM. +
    +
    + + 1. If _offsetMinutes_ ≥ 0, let _sign_ be the code unit 0x002B (PLUS SIGN); otherwise, let _sign_ be the code unit 0x002D (HYPHEN-MINUS). + 1. Let _absoluteMinutes_ be abs(_offsetMinutes_). + 1. Let _hours_ be floor(_absoluteMinutes_ / 60). + 1. Let _minutes_ be _absoluteMinutes_ modulo 60. + 1. Return the string-concatenation of _sign_, ToZeroPaddedDecimalString(_hours_, 2), the code unit 0x003A (COLON), and ToZeroPaddedDecimalString(_minutes_, 2). + +
    @@ -679,7 +709,7 @@

    Properties of Intl.DateTimeFormat Instances

  • [[Locale]] is a String value with the language tag of the locale whose localization is used for formatting.
  • [[Calendar]] is a String value representing the Unicode Calendar Identifier used for formatting.
  • [[NumberingSystem]] is a String value representing the Unicode Number System Identifier used for formatting.
  • -
  • [[TimeZone]] is a String value that is a time zone identifier from the IANA Time Zone Database used for formatting.
  • +
  • [[TimeZone]] is a String value used for formatting that is either a time zone identifier from the IANA Time Zone Database or a UTC offset in ISO 8601 extended format.
  • [[Weekday]], [[Era]], [[Year]], [[Month]], [[Day]], [[DayPeriod]], [[Hour]], [[Minute]], [[Second]], [[TimeZoneName]] are each either *undefined*, indicating that the component is not used for formatting, or one of the String values given in , indicating how the component should be presented in the formatted output.
  • [[FractionalSecondDigits]] is either *undefined* or a positive, non-zero integer Number value indicating the fraction digits to be used for fractional seconds. Numbers will be rounded or padded with trailing zeroes if necessary.
  • [[HourCycle]] is a String value indicating whether the 12-hour format (*"h11"*, *"h12"*) or the 24-hour format (*"h23"*, *"h24"*) should be used. *"h11"* and *"h23"* start with hour 0 and go up to 11 and 23 respectively. *"h12"* and *"h24"* start with hour 1 and go up to 12 and 24. [[HourCycle]] is only used when [[Hour]] is not *undefined*.
  • @@ -1150,7 +1180,11 @@

    - 1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_timeZoneIdentifier_, _epochNs_). + 1. If IsTimeZoneOffsetString(_timeZoneIdentifier_) is *true*, then + 1. Let _offsetNs_ be ParseTimeZoneOffsetString(_timeZoneIdentifier_). + 1. Else, + 1. Assert: IsValidTimeZoneName(_timeZoneIdentifier_) is *true*. + 1. Let _offsetNs_ be GetNamedTimeZoneOffsetNanoseconds(_timeZoneIdentifier_, _epochNs_). 1. Let _tz_ be ℝ(_epochNs_) + _offsetNs_. 1. If _calendar_ is *"gregory"*, then 1. Return a record with fields calculated from _tz_ according to . diff --git a/spec/locales-currencies-tz.html b/spec/locales-currencies-tz.html index 4f2c86be..d204d858 100644 --- a/spec/locales-currencies-tz.html +++ b/spec/locales-currencies-tz.html @@ -182,7 +182,7 @@

    IsValidTimeZoneName ( _timeZone_ )

    - Any value returned from DefaultTimeZone must be recognized as valid. + Any value returned from DefaultTimeZone that is not recognized as valid by IsTimeZoneOffsetString must be recognized as valid by IsValidTimeZoneName. @@ -203,19 +203,6 @@

    - -

    DefaultTimeZone ( ): a String

    - -
    -
    description
    -
    It returns a String value representing the host environment's current time zone, which is a valid () and canonicalized () time zone name.
    -
    - -

    - This definition supersedes the definition provided in es2024, . -

    -
    -

    AvailableCanonicalTimeZones (