ECMAScript Internationalization API - Intl: Difference between revisions
From WikiMLT
m Стадий: 4 [Фаза:Авторизиране, Статус:Разработен]; Категория:JavaScript |
|||
Line 28: | Line 28: | ||
{{devStage | {{devStage | ||
| Прндл = JavaScript | | Прндл = JavaScript | ||
| Стадий = | | Стадий = 4 | ||
| Фаза = | | Фаза = Авторизиране | ||
| Статус = | | Статус = Разработен | ||
| ИдтПт = Spas | | ИдтПт = Spas | ||
| РзбПт = {{REVISIONUSER}} | | РзбПт = Spas | ||
| АвтПт = {{REVISIONUSER}} | |||
| ИдтДт = 21.03.2023 | | ИдтДт = 21.03.2023 | ||
| РзбДт = {{Today}} | | РзбДт = 21.03.2023 | ||
| АвтДт = {{Today}} | |||
| ИдтРв = [[Special:Permalink/32444|32444]] | | ИдтРв = [[Special:Permalink/32444|32444]] | ||
| РзбРв = {{REVISIONID}} | | РзбРв = [[Special:Permalink/32449|32449]] | ||
| АвтРв = {{REVISIONID}} | |||
}} | }} | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Revision as of 20:25, 21 March 2023
The Intl
object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. The Intl
object provides access to several constructors as well as functionality common to the internationalization constructors and other language sensitive functions.
References
- MDN:
Intl
ECMAScript Internationalization API
Simple example
const formatter = new Intl.RelativeTimeFormat("bg-BG", { style: "long" });
formatter.format(-1, "minute");
'преди 1 минута'