Name Description Size
Collator.cpp Intl.Collator implementation. 14255
Collator.h Collator ******************* 3317
Collator.js Portions Copyright Norbert Lindenberg 2011-2012. 13038
CommonFunctions.cpp Operations used to implement multiple Intl.* classes. 5221
CommonFunctions.h Initialize a new Intl.* object using the named self-hosted function. 5900
CommonFunctions.js Portions Copyright Norbert Lindenberg 2011-2012. 29286
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 1951
DateTimeFormat.cpp Intl.DateTimeFormat implementation. 56082
DateTimeFormat.h Returns a new instance of the standard built-in DateTimeFormat constructor. Self-hosted code cannot cache this constructor (as it does for others in Utilities.js) because it is initialized after self-hosted code is compiled. Usage: dateTimeFormat = intl_DateTimeFormat(locales, options) 8672
DateTimeFormat.js Portions Copyright Norbert Lindenberg 2011-2012. 41157
DisplayNames.cpp Intl.DisplayNames implementation. 39116
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) 2842
DisplayNames.js Intl.DisplayNames internal properties. 9912
FormatBuffer.h A buffer for formatting unified intl data. 3227
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 --enable-preview --source=14 IcuMemoryUsage.java $MOZ_JS_SHELL}. 9737
IntlObject.cpp Implementation of the Intl object and its non-constructor properties. 26794
IntlObject.h Returns a plain object with calendar information for a single valid locale (callers must perform this validation). The object will have these properties: firstDayOfWeek an integer in the range 1=Sunday to 7=Saturday indicating the day considered the first day of the week in calendars, e.g. 1 for en-US, 2 for en-GB, 1 for bn-IN minDays an integer in the range of 1 to 7 indicating the minimum number of days required in the first week of the year, e.g. 1 for en-US, 4 for de weekendStart an integer in the range 1=Sunday to 7=Saturday indicating the day considered the beginning of a weekend, e.g. 7 for en-US, 7 for en-GB, 1 for bn-IN weekendEnd an integer in the range 1=Sunday to 7=Saturday indicating the day considered the end of a weekend, e.g. 1 for en-US, 1 for en-GB, 1 for bn-IN (note that "weekend" is *not* necessarily two days) NOTE: "calendar" and "locale" properties are *not* added to the object. 4733
IntlObject.js 8.2.1 Intl.getCanonicalLocales ( locales ) ES2017 Intl draft rev 947aa9a0c853422824a0c9510d8f09be3eb416b9 7606
LanguageTag.cpp 54248
LanguageTag.h Structured representation of Unicode locale IDs used with Intl functions. 26058
LanguageTagGenerated.cpp 44129
ListFormat.cpp Intl.ListFormat([ locales [, options]]) 14931
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) 2067
ListFormat.js ListFormat internal properties. 8419
Locale.cpp Intl.Locale implementation. 41349
Locale.h Returns the complete language tag, including any extensions and privateuse subtags. 1901
make_intl_data.py Usage: make_intl_data.py langtags [cldr_core.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 LanguageTagGenerated.cpp. The code is used in LanguageTag.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. 134201
MeasureUnitGenerated.h The list of currently supported simple unit identifiers. The list must be kept in alphabetical order of |name|. 1442
NumberFormat.cpp Intl.NumberFormat implementation. 41685
NumberFormat.h Returns a new instance of the standard built-in NumberFormat constructor. Self-hosted code cannot cache this constructor (as it does for others in Utilities.js) because it is initialized after self-hosted code is compiled. Usage: numberFormat = intl_NumberFormat(locales, options) 3423
NumberFormat.js Portions Copyright Norbert Lindenberg 2011-2012. 27645
NumberingSystems.yaml 996
NumberingSystemsGenerated.h The list of numbering systems with simple digit mappings. 1201
PluralRules.cpp Implementation of the Intl.PluralRules proposal. 10657
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) 2757
PluralRules.js PluralRules internal properties. Spec: ECMAScript 402 API, PluralRules, 13.3.3. 9503
RelativeTimeFormat.cpp Implementation of the Intl.RelativeTimeFormat proposal. 15707
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) 2817
RelativeTimeFormat.js RelativeTimeFormat internal properties. Spec: ECMAScript 402 API, RelativeTimeFormat, 1.3.3. 8940
SanctionedSimpleUnitIdentifiers.yaml 909
SanctionedSimpleUnitIdentifiersGenerated.js The list of currently supported simple unit identifiers. Intl.NumberFormat Unified API Proposal 1091
ScopedICUObject.h A simple RAII class to assure ICU objects are automatically deallocated at scope end. Unfortunately, ICU's C++ API is uniformly unstable, so we can't use its smart pointers for this. 1155
SharedIntlData.cpp Runtime-wide Intl data shared across compartments. 24440
SharedIntlData.h This deleter class exists so that mozilla::intl::DateTimePatternGenerator can be a forward declaration, but still be used inside of a UniquePtr. 11626
TimeZoneDataGenerated.h 5927