Name Description Size
Calendar.cpp IteratorToListOfType ( iteratorRecord, elementTypes ) With `elementTypes = « String »`. This implementation accepts an iterable instead of an iterator record. 147151
Calendar.h Calendar value, which is either a string containing a canonical calendar identifier or an object. 25405
Duration.cpp DurationSign ( years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds ) 219380
Duration.h Extract the duration fields from the Duration object. 6389
Instant.cpp Check if the absolute value is less-or-equal to the given limit. 54009
Instant.h Extract the instant fields from the Instant object. 4668
moz.build 955
PlainDate.cpp IsValidISODate ( year, month, day ) 72521
PlainDate.h Extract the date fields from the PlainDate object. 4937
PlainDateTime.cpp IsValidISODateTime ( year, month, day, hour, minute, second, millisecond, microsecond, nanosecond ) 80504
PlainDateTime.h Extract the date fields from the PlainDateTime object. 6357
PlainMonthDay.cpp CreateTemporalMonthDay ( isoMonth, isoDay, calendar, referenceISOYear [ , newTarget ] ) 27232
PlainMonthDay.h Extract the date fields from the PlainMonthDay object. 1985
PlainTime.cpp IsValidTime ( hour, minute, second, millisecond, microsecond, nanosecond ) 73722
PlainTime.h Extract the time fields from the PlainTime object. 5644
PlainYearMonth.cpp ISOYearMonthWithinLimits ( year, month ) 42927
PlainYearMonth.h Extract the date fields from the PlainYearMonth object. 1915
Temporal.cpp GetOption ( options, property, type, values, default ) GetOption specialization when `type=string`. Default value handling must happen in the caller, so we don't provide the `default` parameter here. 54120
Temporal.h Rounding increment, which is an integer in the range [1, 1'000'000'000]. Temporal units are rounded to a multiple of the specified increment value. 12375
TemporalFields.cpp 29343
TemporalFields.h PrepareTemporalFields ( fields, fieldNames, requiredFields [ , duplicateBehaviour ] ) 6079
TemporalNow.cpp 6.4.3 DefaultTimeZone () Returns the IANA time zone name for the host environment's current time zone. ES2017 Intl draft rev 4a23f407336d382ed5e3471200c690c9b020b5f3 14303
TemporalNow.h namespace js::temporal 725
TemporalParser.cpp ParseDateTimeUTCOffset ( offsetString ) 90766
TemporalParser.h ParseTemporalInstantString ( isoString ) 4876
TemporalRoundingMode.h NegateTemporalRoundingMode ( roundingMode ) 15760
TemporalTypes.h Instant represents a time since the epoch value, measured in nanoseconds. Instant supports a range of ±8.64 × 10^21 nanoseconds, covering ±10^8 days in either direction relative to midnight at the beginning of 1 January 1970 UTC. The range also exactly matches the supported range of JavaScript Date objects. C++ doesn't provide a built-in type capable of storing an integer in the range ±8.64 × 10^21, therefore we need to create our own abstraction. This struct follows the design of `std::timespec` and splits the instant into a signed seconds part and an unsigned nanoseconds part. 16019
TemporalUnit.h namespace js::temporal 3302
TimeZone.cpp IsValidTimeZoneName ( timeZone ) IsAvailableTimeZoneName ( timeZone ) 70642
TimeZone.h Temporal time zones can be either objects or strings. Objects are either instances of `Temporal.TimeZone` or user-defined time zones. Strings are either canonical time zone identifiers or time zone offset strings. Examples of valid Temporal time zones: - Any object - "UTC" - "America/New_York" - "+00:00" Examples of invalid Temporal time zones: - Number values - "utc" (wrong case) - "Etc/UTC" (canonical name is "UTC") - "+00" (missing minutes part) - "+00:00:00" (sub-minute precision) - "+00:00:01" (sub-minute precision) - "-00:00" (wrong sign for zero offset) String-valued Temporal time zones are an optimization to avoid allocating `Temporal.TimeZone` objects when creating `Temporal.ZonedDateTime` objects. For example `Temporal.ZonedDateTime.from("1970-01-01[UTC]")` doesn't require to allocate a fresh `Temporal.TimeZone` object for the "UTC" time zone. The specification creates new `Temporal.TimeZone` objects whenever any operation is performed on a string-valued Temporal time zone. This newly created object can't be accessed by the user and implementations are expected to optimize away the allocation. The following two implementation approaches are possible: 1. Represent string-valued time zones as JSStrings. Additionally keep a mapping from JSString to `mozilla::intl::TimeZone` to avoid repeatedly creating new `mozilla::intl::TimeZone` for time zone operations. Offset string time zones have to be special cased, because they don't use `mozilla::intl::TimeZone`. Either detect offset strings by checking the time zone identifier or store offset strings as the offset in minutes value to avoid reparsing the offset string again and again. 2. Represent string-valued time zones as `Temporal.TimeZone`-like objects. These internal `Temporal.TimeZone`-like objects must not be exposed to user-code. Option 2 is a bit easier to implement, so we use this approach for now. 13926
ToString.cpp FormatFractionalSeconds ( subSecondNanoseconds, precision ) 19621
ToString.h TemporalInstantToString ( instant, timeZone, precision ) 3151
Wrapped.cpp 766
Wrapped.h Type to represent possibly wrapped objects from a different compartment. This can be used to represent specific JSObject sub-classes in return types without having to pass unwrapped objects around. 4870
ZonedDateTime.cpp InterpretISODateTimeOffset ( year, month, day, hour, minute, second, millisecond, microsecond, nanosecond, offsetBehaviour, offsetNanoseconds, timeZone, disambiguation, offsetOption, matchBehaviour ) 114263
ZonedDateTime.h Extract the instant fields from the ZonedDateTime object. 6146