Home - sumup-oss/intl-js GitHub Wiki
@sumup-oss/intl
Number
Function | Description |
---|---|
formatNumber | Formats a number with support for various styles, units, and notations. |
formatNumberToParts | Formats a number with support for various styles, units, and notations. |
resolveNumberFormat | Resolves the locale and collation options that are used to format a number. |
Currency
Function | Description |
---|---|
formatCurrency | Formats a number in the country's official currency with support for various notations. |
formatCurrencyToParts | Formats a number in the country's official currency with support for various notations. |
resolveCurrencyFormat | Resolves the locale and collation options that are used to format a number in the country's official currency. |
Date & Time
Function | Description |
---|---|
formatDateTime | Formats a Date with support for various date and time styles. |
formatDate | Formats a Date with support for various date styles. |
formatTime | Formats a Date with support for various time styles. |
formatDateTimeToParts | Formats a Date to parts with support for various date and time styles. |
resolveDateTimeFormat | Resolves the locale and collation options that are used to format a Date . |
formatRelativeTime | Formats a relative time with support for various styles. |
formatRelativeTimeToParts | Formats a relative time to parts with support for various styles. |
resolveRelativeTimeFormat | Resolves the locale and collation options that are used to format a relative time. |
Other
Variable | Description |
---|---|
CURRENCIES | An object that maps a 2 char country code to its official 3 char currency code. View all supported countries. |
isDateTimeFormatSupported | Whether the Intl and Intl.DateTimeFormat APIs are supported by the runtime. |
isDateTimeFormatToPartsSupported | Whether the Intl , Intl.DateTimeFormat , and Intl.DateTimeFormat.formatToParts APIs are supported by the runtime. |
isNumberFormatSupported | Whether the Intl and Intl.NumberFormat APIs are supported by the runtime. |
isNumberFormatToPartsSupported | Whether the Intl , Intl.NumberFormat , and Intl.NumberFormat.formatToParts APIs are supported by the runtime. |
isRelativeTimeFormatSupported | Whether the Intl and Intl.RelativeTimeFormat APIs are supported by the runtime. |