The i18n module provides a wide array of internationalization (i18n) APIs for implementing functions such as date and time formatting.
The directory structure for the i18n module is as follows:
/base/global/
├── i18n # Code repository for the i18n framework
│ ├── frameworks # Core code of the i18n framework
│ ├── interfaces # APIs
│ │ ├── js # JavaScript APIs
│ │ └── native # Native APIs
Development language: JavaScript
Language, script, and country codes: The supported language must be represented by a two- or three-letter code defined in the ISO 639 standard; the supported script must be represented by a four-letter code defined in the ISO 15924 standard; the supported country must be represented by a two-letter code defined in the ISO 3166 standard.
Change the date and time formats (such as the sequence of year, month, and day, month and week names, and 12-hour or 24-hour system) following the system settings to adapt to the cultural habits of users in different locales. For details, see the API reference. The sample code is as follows:
const date = new Date(2021, 11, 17, 3, 24, 0); // Create a Date object containing date and time information.
fmt = new Intl.DateTimeFormat('en-US') // Create a DateTimeFormat instance.
console.log(fmt.format(date)); // Format the date and time by using the DateTimeFormat instance.
Globalization subsystem
global_i18n_standard
global_resmgr_standard
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Activity
Community
Health
Trend
Influence
:Code submit frequency
:React/respond to issue & PR etc.
:Well-balanced team members and collaboration
:Recent popularity of project
:Star counts, download counts etc.