Name Description Size
Collator.cpp Intl.Collator implementation. 13798
Collator.h Collator ******************* 3676
Collator.js Portions Copyright Norbert Lindenberg 2011-2012. 9746
CommonFunctions.cpp Operations used to implement multiple Intl.* classes. 5525
CommonFunctions.h Initialize a new Intl.* object using the named self-hosted function. 4074
CommonFunctions.js Portions Copyright Norbert Lindenberg 2011-2012. 13198
CurrencyDataGenerated.js Mapping from currency codes to the number of decimal digits used for them. Default is 2 digits. Spec: ISO 4217 Currency and Funds Code List. http://www.currency-iso.org/en/home/tables/table-a1.html 1819
DateTimeFormat.cpp Intl.DateTimeFormat implementation. 83200
DateTimeFormat.h Returns a String value representing x (which must be a Number value) according to the effective locale and the formatting options of the given DateTimeFormat. Spec: ECMAScript Internationalization API Specification, 12.3.2. Usage: formatted = intl_FormatDateTime(dateTimeFormat, x, formatToParts) 6964
DateTimeFormat.js Portions Copyright Norbert Lindenberg 2011-2012. 22869
DisplayNames.cpp Intl.DisplayNames implementation. 19198
DisplayNames.h Return the display name for the requested code or undefined if no applicable display name was found. Usage: result = intl_ComputeDisplayName(displayNames, locale, calendar, style, languageDisplay, fallback, type, code) 2440
DisplayNames.js Intl.DisplayNames ( [ locales [ , options ] ] ) Compute an internal properties object from |lazyDisplayNamesData|. 8691
DurationFormat.cpp Intl.DurationFormat implementation. 55165
DurationFormat.h DurationDisplay 5510
DurationFormat.js Intl.DurationFormat ( [ locales [ , options ] ] ) Compute an internal properties object from |lazyDurationFormatData|. 15876
FormatBuffer.h A buffer for formatting unified intl data. 4431
GlobalIntlData.cpp 9815
GlobalIntlData.h Cached per-global Intl data. In contrast to SharedIntlData, which is a per-runtime shared Intl cache, this cache is per-global. 5750
IcuMemoryUsage.java Java program to estimate the memory usage of ICU objects (bug 1585536). It computes for each Intl constructor the amount of allocated memory. We're currently using the maximum memory ("max" in the output) to estimate the memory consumption of ICU objects. Insert before {@code JS_InitWithFailureDiagnostic} in "js.cpp": <pre> <code> JS_SetICUMemoryFunctions( [](const void*, size_t size) { void* ptr = malloc(size); if (ptr) { printf(" alloc: %p -> %zu\n", ptr, size); } return ptr; }, [](const void*, void* p, size_t size) { void* ptr = realloc(p, size); if (p) { printf(" realloc: %p -> %p -> %zu\n", p, ptr, size); } else { printf(" alloc: %p -> %zu\n", ptr, size); } return ptr; }, [](const void*, void* p) { if (p) { printf(" free: %p\n", p); } free(p); }); </code> </pre> Run this script with: {@code java IcuMemoryUsage.java $MOZ_JS_SHELL}. 9992
IntlObject.cpp Implementation of the Intl object and its non-constructor properties. 23536
IntlObject.h Compares a BCP 47 language tag against the locales in availableLocales and returns the best available match -- or |undefined| if no match was found. Uses the fallback mechanism of RFC 4647, section 3.4. The set of available locales consulted doesn't necessarily include the default locale or any generalized forms of it (e.g. "de" is a more-general form of "de-CH"). If you want to be sure to consider the default local and its generalized forms (you usually will), pass the default locale as the value of |defaultOrNull|; otherwise pass null. Spec: ECMAScript Internationalization API Specification, 9.2.2. Spec: RFC 4647, section 3.4. Usage: result = intl_BestAvailableLocale("Collator", locale, defaultOrNull) 2179
LanguageTag.cpp 8592
LanguageTag.h Structured representation of Unicode locale IDs used with Intl functions. 3540
ListFormat.cpp Intl.ListFormat([ locales [, options]]) 11714
ListFormat.h Returns a string representing the array of string values |list| according to the effective locale and the formatting options of the given ListFormat. Usage: formatted = intl_FormatList(listFormat, list, formatToParts) 2123
ListFormat.js Intl.ListFormat ( [ locales [ , options ] ] ) Compute an internal properties object from |lazyListFormatData|. 7237
Locale.cpp Intl.Locale implementation. 48912
Locale.h Returns the complete language tag, including any extensions and privateuse subtags. 1744
LocaleNegotiation.cpp 9.2.2 BestAvailableLocale ( availableLocales, locale ) Compares a BCP 47 language tag against the locales in availableLocales and returns the best available match. Uses the fallback mechanism of RFC 4647, section 3.4. Spec: ECMAScript Internationalization API Specification, 9.2.2. Spec: RFC 4647, section 3.4. 45980
LocaleNegotiation.h ca 11556
make_intl_data.py Usage: make_intl_data.py langtags [cldr_common.zip] make_intl_data.py tzdata make_intl_data.py currency make_intl_data.py units make_intl_data.py numbering Target "langtags": This script extracts information about 1) mappings between deprecated and current Unicode BCP 47 locale identifiers, and 2) deprecated and current BCP 47 Unicode extension value from CLDR, and converts it to C++ mapping code in intl/components/LocaleGenerated.cpp. The code is used in intl/components/Locale.cpp. Target "tzdata": This script computes which time zone informations are not up-to-date in ICU and provides the necessary mappings to workaround this problem. https://ssl.icu-project.org/trac/ticket/12044 Target "currency": Generates the mapping from currency codes to decimal digits used for them. Target "units": Generate source and test files using the list of so-called "sanctioned unit identifiers" and verifies that the ICU data filter includes these units. Target "numbering": Generate source and test files using the list of numbering systems with simple digit mappings and verifies that it's in sync with ICU/CLDR. 134274
moz.build 1071
NumberFormat.cpp Intl.NumberFormat implementation. 43728
NumberFormat.h Returns a new instance of the standard built-in NumberFormat constructor. Usage: numberFormat = intl_NumberFormat(locales, options) 5782
NumberFormat.js Portions Copyright Norbert Lindenberg 2011-2012. 33052
NumberingSystems.yaml 1091
NumberingSystemsGenerated.h The list of numbering systems with simple digit mappings. 1356
PluralRules.cpp Implementation of the Intl.PluralRules proposal. 16050
PluralRules.h Returns a plural rule for the number x according to the effective locale and the formatting options of the given PluralRules. A plural rule is a grammatical category that expresses count distinctions (such as "one", "two", "few" etc.). Usage: rule = intl_SelectPluralRule(pluralRules, x) 3343
PluralRules.js 16.1.2 InitializePluralRules ( pluralRules, locales, options ) Compute an internal properties object from |lazyPluralRulesData|. ES2024 Intl draft rev 74ca7099f103d143431b2ea422ae640c6f43e3e6 11190
RelativeTimeFormat.cpp Implementation of the Intl.RelativeTimeFormat proposal. 12958
RelativeTimeFormat.h Returns a relative time as a string formatted according to the effective locale and the formatting options of the given RelativeTimeFormat. |t| should be a number representing a number to be formatted. |unit| should be "second", "minute", "hour", "day", "week", "month", "quarter", or "year". |numeric| should be "always" or "auto". Usage: formatted = intl_FormatRelativeTime(relativeTimeFormat, t, unit, numeric, formatToParts) 2896
RelativeTimeFormat.js Compute an internal properties object from |lazyRelativeTimeFormatData|. 7110
SanctionedSimpleUnitIdentifiers.yaml 936
SanctionedSimpleUnitIdentifiersGenerated.js The list of currently supported simple unit identifiers. Intl.NumberFormat Unified API Proposal 1069
Segmenter.cpp Intl.Segmenter implementation. 32361
Segmenter.h 11224
Segmenter.js Intl.Segmenter ( [ locales [ , options ] ] ) Compute an internal properties object from |lazySegmenterData|. 9177
SharedIntlData.cpp Runtime-wide Intl data shared across compartments. 29784
SharedIntlData.h This deleter class exists so that mozilla::intl::DateTimePatternGenerator can be a forward declaration, but still be used inside of a UniquePtr. 14805
StringAsciiChars.h String view of an ASCII-only string. This holds a reference to a JSLinearString and can produce a string view into that string. If the string is represented by Latin1 characters, the span is returned directly. If the string is represented by UTF-16 characters, it copies the char16_t characters into a char array, and then returns a span based on the copy. This allows us to avoid copying for the common use case that the ASCII characters are represented in Latin1. 2148
TimeZoneDataGenerated.h 5535
TimeZoneMapping.yaml 2676