diff --git a/package.json b/package.json index 2c7cd58eee..8aad90fb49 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "prebuild-snapshot": "npm run clean", "build-snapshot": "npm run build-head && node scripts/insert-snapshot-warning.js", "clean": "rm -rf out", - "format": "emu-format --write spec.html", + "format": "emu-format --write spec.html temporal/*.emu", "test": "exit 0", "watch": "npm run build-only -- --lint-spec --watch", "check-commit": "node scripts/check-commit" diff --git a/spec.html b/spec.html index fe44410f4b..26c58d2df3 100644 --- a/spec.html +++ b/spec.html @@ -281,6 +281,10 @@

Normative References

The Unicode Standard.
https://unicode.org/versions/latest

+

+ Unicode Technical Standard #35, Unicode Locale Data Markup Language (LDML)
+ https://unicode.org/reports/tr35 +

ISO/IEC 10646, Information Technology — Universal Multiple-Octet Coded Character Set (UCS) plus Amendment 1:2005, Amendment 2:2006, Amendment 3:2008, Amendment 4:2008, and additional amendments and corrigenda, or successor.

ECMA-402, ECMAScript Internationalization API Specification, specifically the annual edition corresponding to this edition of this specification.
@@ -661,9 +665,13 @@

The Lexical and RegExp Grammars

-

The Numeric String Grammar

+

The Numeric String and ISO 8601 / RFC 9557 Grammars

A numeric string grammar appears in . It has as its terminal symbols |SourceCharacter|, and is used for translating Strings into numeric values starting from the goal symbol |StringNumericLiteral| (which is similar to but distinct from the lexical grammar for numeric literals).

-

Productions of the numeric string grammar are distinguished by having three colons “:::” as punctuation, and are never used for parsing source text.

+

+ A grammar for parsing strings representing dates, times, and durations, according to the formats specified in ISO 8601 and RFC 9557, is given in . + This grammar has as its terminal symbols Unicode code points that conform to the rules for |SourceCharacter|. It is used for parsing Strings in the context of various date, time, or duration-related functions, starting from one of the goal symbols |TemporalDateTimeString|, |TemporalDurationString|, |TemporalInstantString|, |TemporalMonthDayString|, |TemporalTimeString|, |TemporalYearMonthString|, |NormalizedUTCOffset|, or |TimeZoneIANAName|. +

+

Productions of the numeric string and ISO 8601 / RFC 9557 grammars are distinguished by having three colons “:::” as punctuation, and are never used for parsing source text.

@@ -1181,13 +1189,14 @@

Mathematical Operations

The mathematical function ln(_x_) produces the natural logarithm of _x_. The mathematical function log10(_x_) produces the base 10 logarithm of _x_. The mathematical function log2(_x_) produces the base 2 logarithm of _x_.

The mathematical function min(_x1_, _x2_, … , _xN_) produces the mathematically smallest of _x1_ through _xN_. The mathematical function max(_x1_, _x2_, ..., _xN_) produces the mathematically largest of _x1_ through _xN_. The domain and range of these mathematical functions are the extended mathematical values.

The notation “_x_ modulo _y_” (_y_ must be finite and non-zero) computes a value _k_ of the same sign as _y_ (or zero) such that abs(_k_) < abs(_y_) and _x_ - _k_ = _q_ × _y_ for some integer _q_.

+

The mathematical function remainder(_x_, _y_) produces the mathematical value whose sign is the sign of _x_ and whose magnitude is abs(_x_) modulo _y_.

The phrase "the result of clamping _x_ between _lower_ and _upper_" (where _x_ is an extended mathematical value and _lower_ and _upper_ are mathematical values such that _lower_ ≤ _upper_) produces _lower_ if _x_ < _lower_, produces _upper_ if _x_ > _upper_, and otherwise produces _x_.

The mathematical function floor(_x_) produces the largest integer (closest to +∞) that is not larger than _x_.

floor(_x_) = _x_ - (_x_ modulo 1).

The mathematical function truncate(_x_) removes the fractional part of _x_ by rounding towards zero, producing -floor(-_x_) if _x_ < 0 and otherwise producing floor(_x_).

-

Mathematical functions min, max, abs, floor, and truncate are not defined for Numbers and BigInts, and any usage of those methods that have non-mathematical value arguments would be an editorial error in this specification.

+

Mathematical functions min, max, abs, remainder, floor, and truncate are not defined for Numbers and BigInts, and any usage of those methods that have non-mathematical value arguments would be an editorial error in this specification.

An interval from lower bound _a_ to upper bound _b_ is a possibly-infinite, possibly-empty set of numeric values of the same numeric type. Each bound will be described as either inclusive or exclusive, but not both. There are four kinds of intervals, as follows: