diff --git a/zh-cn/application-dev/reference/apis/js-apis-i18n.md b/zh-cn/application-dev/reference/apis/js-apis-i18n.md
index 5d636d4ef4af3c33a6a604684aee859028ded636..5dfcf16cf0b3f359ec2afb89c244c1cca9b8e14f 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-i18n.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-i18n.md
@@ -13,17 +13,14 @@ import i18n from '@ohos.i18n';
```
-## 权限
-
-无
-
-
## i18n.getDisplayLanguage
getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string
获取指定语言的本地化显示文本。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -49,6 +46,8 @@ getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): stri
获取指定国家的本地化显示文本。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -74,6 +73,8 @@ isRTL(locale: string): boolean
获取是否为从右至左显示语言。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 说明 |
| -------- | -------- | -------- |
@@ -97,6 +98,8 @@ getSystemLanguage(): string
获取系统语言。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -114,6 +117,8 @@ getSystemRegion(): string
获取系统地区。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -131,6 +136,8 @@ getSystemLocale(): string
获取系统区域。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -148,6 +155,8 @@ getCalendar(locale: string, type? : string): Calendar
获取日历对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -174,6 +183,8 @@ setTime(date: Date): void
设置日历对象内部的时间日期。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -193,6 +204,8 @@ setTime(time: number): void
设置日历对象内部的时间日期, time为从1970.1.1 00:00:00 GMT逝去的毫秒数。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -211,6 +224,8 @@ set(year: number, month: number, date:number, hour?: number, minute?: number, se
设置日历对象的年、月、日、时、分、秒。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -234,6 +249,8 @@ setTimeZone(timezone: string): void
设置日历对象的时区。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -252,6 +269,8 @@ getTimeZone(): string
获取日历对象的时区。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -271,6 +290,8 @@ getFirstDayOfWeek(): number
获取日历对象的一周起始日。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -289,6 +310,8 @@ setFirstDayOfWeek(value: number): void
设置每一周的起始日。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -307,6 +330,8 @@ getMinimalDaysInFirstWeek(): number
获取一年中第一周的最小天数。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -325,6 +350,8 @@ setMinimalDaysInFirstWeek(value: number): void
设置一年中第一周的最小天数。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -343,6 +370,8 @@ get(field: string): number
获取日历对象中与field相关联的值。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -367,6 +396,8 @@ getDisplayName(locale: string): string
获取日历对象在locale所指定的区域的名字。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -390,6 +421,8 @@ isWeekend(date?: Date): boolean
判断给定的日期是否在日历中是周末。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -419,6 +452,8 @@ constructor(country: string, options?: PhoneNumberFormatOptions)
创建电话号码格式化对象。
+**系统能力**:SystemCapability.Global.I18n
+
参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -437,6 +472,8 @@ isValidNumber(number: string): boolean
判断传入的电话号码格式是否正确。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -460,6 +497,8 @@ format(number: string): string
对电话号码进行格式化。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -484,7 +523,7 @@ format(number: string): string
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| type | string | 是 | 是 | 表示对电话号码格式化的类型,取值范围:"E164", "INTERNATIONAL", "NATIONAL", "RFC3966"。 |
+| type | string | 是 | 是 | 表示对电话号码格式化的类型,取值范围:"E164", "INTERNATIONAL", "NATIONAL", "RFC3966"。
**系统能力**:SystemCapability.Global.I18n |
## UnitInfo8+
@@ -495,7 +534,7 @@ format(number: string): string
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
| unit | string | 是 | 是 | 单位的名称,如:"meter", "inch", "cup"等。 |
-| measureSystem | string | 是 | 是 | 单位的度量体系,取值包括:"SI", "US", "UK"。 |
+| measureSystem | string | 是 | 是 | 单位的度量体系,取值包括:"SI", "US", "UK"。
**系统能力**:SystemCapability.Global.I18n |
## Util8+
@@ -507,6 +546,8 @@ unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string,
将fromUnit的单位转换为toUnit的单位,并根据区域与风格进行格式化。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -536,6 +577,8 @@ getInstance(): IndexUtil
创建并返回IndexUtil对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -558,6 +601,8 @@ getIndexList(): Array<string>
获取当前locale对应的索引列表。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -576,6 +621,8 @@ addLocale(locale: string)
将新的locale对应的索引加入当前索引列表。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -594,6 +641,8 @@ getIndex(text: string): string
获取text对应的索引。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -620,6 +669,8 @@ isDigit(char: string): boolean
判断字符串char是否是数字。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -642,6 +693,8 @@ isSpaceChar(char: string): boolean
判断字符串char是否是空格符。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -664,6 +717,8 @@ isWhitespace(char: string): boolean
判断字符串char是否是空白符。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -686,6 +741,8 @@ isRTL(char: string): boolean
判断字符串char是否是从右到左语言的字符。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -708,6 +765,8 @@ isIdeograph(char: string): boolean
判断字符串char是否是表意文字。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -730,6 +789,8 @@ isLetter(char: string): boolean
判断字符串char是否是字母。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -752,6 +813,8 @@ isLowerCase(char: string): boolean
判断字符串char是否是小写字母。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -774,6 +837,8 @@ isUpperCase(char: string): boolean
判断字符串char是否是大写字母。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -796,6 +861,8 @@ getType(char: string): string
获取输入字符串的一般类别值。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -818,6 +885,8 @@ getLineInstance(locale: string): BreakIterator
获取一个用于断句的[BreakIterator](#breakiterator8)对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -843,6 +912,8 @@ setLineBreakText(text: string): void
设置[BreakIterator](#breakiterator8)要处理的文本。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -861,6 +932,8 @@ getLineBreakText(): string
获取[BreakIterator](#breakiterator8)当前处理的文本。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -880,6 +953,8 @@ current(): number
获取[BreakIterator](#breakiterator8)对象在当前处理的文本中的位置。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -899,6 +974,8 @@ first(): number
将[BreakIterator](#breakiterator8)对象设置到第一个可断句的分割点。第一个分割点总是被处理的文本的起始位置。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -918,6 +995,8 @@ last(): number
将[BreakIterator](#breakiterator8)对象的位置设置到最后一个可断句的分割点。最后一个分割点总是被处理文本末尾的下一个位置。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -937,6 +1016,8 @@ next(index?: number): number
如果index给出,并且index是一个正数将[BreakIterator](#breakiterator8)向后移动number个可断句的分割点,如果n是一个负数,向前移动相应个分割点。若index没有给出,则相当于index = 1。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -963,6 +1044,8 @@ previous(): number
将[BreakIterator](#breakiterator8)移动到前一个分割点处。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -984,6 +1067,8 @@ following(offset: number): number
将[BreakIterator](#breakiterator8)设置到由offset指定的位置的后面一个分割点。返回移动后[BreakIterator](#breakiterator8)的位置。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -1010,6 +1095,8 @@ isBoundary(offset: number): boolean
如果offset所指定的文本位置是一个分割点,那么返回true,否则返回false。如果返回true, 将[BreakIterator](#breakiterator8)对象设置到offset所指定的位置, 否则相当于调用[following](#following8)(offset)。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -1029,12 +1116,14 @@ isBoundary(offset: number): boolean
```
-## i18n.is24HourClock
+## i18n.is24HourClock8+
is24HourClock(): boolean
判断系统时间是否为24小时制。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -1046,12 +1135,14 @@ is24HourClock(): boolean
```
-## i18n.set24HourClock
+## i18n.set24HourClock8+
set24HourClock(option: boolean): boolean
修改系统时间的24小时制设置。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -1069,12 +1160,14 @@ set24HourClock(option: boolean): boolean
```
-## i18n.addPreferredLanguage
+## i18n.addPreferredLanguage8+
addPreferredLanguage(language: string, index?: number): boolean
在系统偏好语言列表中的指定位置添加偏好语言。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -1095,12 +1188,14 @@ addPreferredLanguage(language: string, index?: number): boolean
```
-## i18n.removeDisplayLanguage
+## i18n.removeDisplayLanguage8+
removeDisplayLanguage(index: number): boolean
删除系统偏好语言列表中指定位置的偏好语言。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -1119,12 +1214,14 @@ removeDisplayLanguage(index: number): boolean
```
-## i18n.getPreferredLanguageList
+## i18n.getPreferredLanguageList8+
getPreferredLanguageList(): Array
获取系统偏好语言列表。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -1136,12 +1233,14 @@ getPreferredLanguageList(): Array
```
-## i18n.getFirstPreferredLanguage
+## i18n.getFirstPreferredLanguage8+
getFirstPreferredLanguage(): string
获取与Hap资源最佳匹配的偏好语言。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
diff --git a/zh-cn/application-dev/reference/apis/js-apis-intl.md b/zh-cn/application-dev/reference/apis/js-apis-intl.md
index acc6e97ba97a8415fa81580c2ea9a2aae6c96f79..eb6a9804cff291c5d5f7bcee22b1caccbab7e7de 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-intl.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-intl.md
@@ -13,11 +13,6 @@ import Intl from '@ohos.intl';
```
-## 权限列表
-
-无
-
-
## Locale
@@ -25,16 +20,16 @@ import Intl from '@ohos.intl';
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| language | string | 是 | 否 | 与区域设置关联的语, 如:zh。 |
-| script | string | 是 | 否 | 语言的书写方式,如:Hans。 |
-| region | string | 是 | 否 | 与区域设置相关的地区,如:CN。 |
-| baseName | string | 是 | 否 | Locale的基本核心信息(由语言脚本与地区组成),如:zh-Hans-CN。 |
-| caseFirst | string | 是 | 否 | 区域的整理规则是否考虑大小写,取值包括:"upper", "lower", "false"。 |
-| calendar | string | 是 | 否 | 区域的日历信息,取值包括:"buddhist", "chinese", "coptic","dangi", "ethioaa", "ethiopic", "gregory", "hebrew", "indian", "islamic", "islamic-umalqura", "islamic-tbla", "islamic-civil", "islamic-rgsa", "iso8601", "japanese", "persian", "roc", "islamicc"。 |
-| collation | string | 是 | 否 | 区域的排序规则,取值包括:"big5han", "compat", "dict", "direct", "ducet", "eor", "gb2312", "phonebk", "phonetic", "pinyin", "reformed", "searchjl", "stroke", "trad", "unihan", "zhuyin"。 |
-| hourCycle | string | 是 | 否 | 区域的时制信息,取值包括:"h12", "h23", "h11", "h24"。 |
-| numberingSystem | string | 是 | 否 | 区域使用的数字系统,取值包括:"adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho"。 |
-| numeric | boolean | 是 | 否 | 是否对数字字符具有特殊的排序规则处理。 |
+| language | string | 是 | 否 | 与区域设置关联的语, 如:zh。
**系统能力**:SystemCapability.Global.I18n |
+| script | string | 是 | 否 | 语言的书写方式,如:Hans。
**系统能力**:SystemCapability.Global.I18n |
+| region | string | 是 | 否 | 与区域设置相关的地区,如:CN。
**系统能力**:SystemCapability.Global.I18n |
+| baseName | string | 是 | 否 | Locale的基本核心信息(由语言脚本与地区组成),如:zh-Hans-CN。
**系统能力**:SystemCapability.Global.I18n |
+| caseFirst | string | 是 | 否 | 区域的整理规则是否考虑大小写,取值包括:"upper", "lower", "false"。
**系统能力**:SystemCapability.Global.I18n |
+| calendar | string | 是 | 否 | 区域的日历信息,取值包括:"buddhist", "chinese", "coptic","dangi", "ethioaa", "ethiopic", "gregory", "hebrew", "indian", "islamic", "islamic-umalqura", "islamic-tbla", "islamic-civil", "islamic-rgsa", "iso8601", "japanese", "persian", "roc", "islamicc"。
**系统能力**:SystemCapability.Global.I18n |
+| collation | string | 是 | 否 | 区域的排序规则,取值包括:"big5han", "compat", "dict", "direct", "ducet", "eor", "gb2312", "phonebk", "phonetic", "pinyin", "reformed", "searchjl", "stroke", "trad", "unihan", "zhuyin"。
**系统能力**:SystemCapability.Global.I18n |
+| hourCycle | string | 是 | 否 | 区域的时制信息,取值包括:"h12", "h23", "h11", "h24"。
**系统能力**:SystemCapability.Global.I18n |
+| numberingSystem | string | 是 | 否 | 区域使用的数字系统,取值包括:"adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho"。
**系统能力**:SystemCapability.Global.I18n |
+| numeric | boolean | 是 | 否 | 是否对数字字符具有特殊的排序规则处理。
**系统能力**:SystemCapability.Global.I18n |
### constructor
@@ -43,6 +38,8 @@ constructor(locale: string, options?: options)
创建区域对象
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -61,6 +58,8 @@ toString(): string
将区域信息转换为字符串
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -79,6 +78,8 @@ maximize(): Locale
最大化区域信息,若缺少脚本与地区信息,则补齐。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -97,6 +98,8 @@ minimize(): Locale
最小化区域信息,若包含脚本与地区信息,则去除。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -118,6 +121,8 @@ constructor(locale: string, options?: DateTimeOptions)
创建时间日期格式化对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -136,6 +141,8 @@ constructor(locales: Array<string>, options?: DateTimeOptions)
创建时间日期格式化对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -154,6 +161,8 @@ format(date: Date): string
格式化时间日期字符串。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -178,6 +187,8 @@ formatRange(fromDate: Date, toDate: Date): string
格式化时间日期段字符串。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -204,6 +215,8 @@ resolvedOptions(): DateTimeOptions
获取DateTimeFormat对象的格式化选项。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -222,25 +235,25 @@ resolvedOptions(): DateTimeOptions
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| locale | string | 是 | 否 | 区域参数, 如:zh-Hans-CN。 |
-| dateStyle | string | 是 | 是 | 日期显示格式,取值包括:"long", "short", "medium", "full"。 |
-| timeStyle | string | 是 | 是 | 时间显示格式,取值包括:"long", "short", "medium", "full"。 |
-| hourCycle | string | 是 | 是 | 时制格式,取值包括:"h11", "h12", "h23", "h24"。 |
-| timeZone | string | 是 | 是 | 使用的时区(合法的IANA时区ID)。 |
-| numberingSystem | string | 是 | 是 | 数字系统,取值包括:"adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho"。 |
-| hour12 | boolean | 是 | 是 | 是否使用12小时制。 |
-| weekday | string | 是 | 是 | 工作日的显示格式,取值包括:"long", "short", "narrow"。 |
-| era | string | 是 | 是 | 时代的显示格式,取值包括:"long", "short", "narrow"。 |
-| year | string | 是 | 是 | 年份的显示格式,取值包括:"numeric", "2-digit"。 |
-| month | string | 是 | 是 | 月份的显示格式,取值包括:"numeric", "2-digit", "long", "short", "narrow"。 |
-| day | string | 是 | 是 | 日期的显示格式,取值包括:"numeric", "2-digit"。 |
-| hour | string | 是 | 是 | 小时的显示格式,取值包括:"numeric", "2-digit"。 |
-| minute | string | 是 | 是 | 分钟的显示格式,取值包括:"numeric", "2-digit"。 |
-| second | string | 是 | 是 | 秒钟的显示格式,取值包括:"numeric", "2-digit"。 |
-| timeZoneName | string | 是 | 是 | 时区名称的本地化表示。 |
-| dayPeriod | string | 是 | 是 | 时段的显示格式,取值包括:"long", "short", "narrow"。 |
-| localeMatcher | string | 是 | 是 | 要使用的区域匹配算法,取值包括:"lookup", "best fit"。 |
-| formatMatcher | string | 是 | 是 | 要使用的格式匹配算法,取值包括:"basic", "best fit"。 |
+| locale | string | 是 | 否 | 区域参数, 如:zh-Hans-CN。
**系统能力**:SystemCapability.Global.I18n |
+| dateStyle | string | 是 | 是 | 日期显示格式,取值包括:"long", "short", "medium", "full"。
**系统能力**:SystemCapability.Global.I18n |
+| timeStyle | string | 是 | 是 | 时间显示格式,取值包括:"long", "short", "medium", "full"。
**系统能力**:SystemCapability.Global.I18n |
+| hourCycle | string | 是 | 是 | 时制格式,取值包括:"h11", "h12", "h23", "h24"。
**系统能力**:SystemCapability.Global.I18n |
+| timeZone | string | 是 | 是 | 使用的时区(合法的IANA时区ID)。
**系统能力**:SystemCapability.Global.I18n |
+| numberingSystem | string | 是 | 是 | 数字系统,取值包括:"adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho"。
**系统能力**:SystemCapability.Global.I18n |
+| hour12 | boolean | 是 | 是 | 是否使用12小时制。
**系统能力**:SystemCapability.Global.I18n |
+| weekday | string | 是 | 是 | 工作日的显示格式,取值包括:"long", "short", "narrow"。
**系统能力**:SystemCapability.Global.I18n |
+| era | string | 是 | 是 | 时代的显示格式,取值包括:"long", "short", "narrow"。
**系统能力**:SystemCapability.Global.I18n |
+| year | string | 是 | 是 | 年份的显示格式,取值包括:"numeric", "2-digit"。
**系统能力**:SystemCapability.Global.I18n |
+| month | string | 是 | 是 | 月份的显示格式,取值包括:"numeric", "2-digit", "long", "short", "narrow"。
**系统能力**:SystemCapability.Global.I18n |
+| day | string | 是 | 是 | 日期的显示格式,取值包括:"numeric", "2-digit"。
**系统能力**:SystemCapability.Global.I18n |
+| hour | string | 是 | 是 | 小时的显示格式,取值包括:"numeric", "2-digit"。
**系统能力**:SystemCapability.Global.I18n |
+| minute | string | 是 | 是 | 分钟的显示格式,取值包括:"numeric", "2-digit"。
**系统能力**:SystemCapability.Global.I18n |
+| second | string | 是 | 是 | 秒钟的显示格式,取值包括:"numeric", "2-digit"。
**系统能力**:SystemCapability.Global.I18n |
+| timeZoneName | string | 是 | 是 | 时区名称的本地化表示。
**系统能力**:SystemCapability.Global.I18n |
+| dayPeriod | string | 是 | 是 | 时段的显示格式,取值包括:"long", "short", "narrow"。
**系统能力**:SystemCapability.Global.I18n |
+| localeMatcher | string | 是 | 是 | 要使用的区域匹配算法,取值包括:"lookup", "best fit"。
**系统能力**:SystemCapability.Global.I18n |
+| formatMatcher | string | 是 | 是 | 要使用的格式匹配算法,取值包括:"basic", "best fit"。
**系统能力**:SystemCapability.Global.I18n |
## NumberFormat
@@ -252,6 +265,8 @@ constructor(locale: string, options?: NumberOptions)
创建数字格式化对象。
+**系统能力**:SystemCapability.Global.I18n
+
参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -270,6 +285,8 @@ constructor(locales: Array<string>, options?: NumberOptions)
创建数字格式化对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -288,6 +305,8 @@ format(number: number): string;
格式化数字字符串。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -312,6 +331,8 @@ resolvedOptions(): NumberOptions
获取NumberFormat 对象的格式化选项。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -331,25 +352,25 @@ resolvedOptions(): NumberOptions
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| locale | string | 是 | 否 | 区域参数, 如:"zh-Hans-CN"。 |
-| currency | string | 是 | 是 | 货币单位, 如:"EUR","CNY","USD"等。 |
-| currencySign | string | 是 | 是 | 货币单位的符号显示,取值包括: "symbol","narrowSymbol","code","name" 。 |
-| currencyDisplay | string | 是 | 是 | 货币的显示方式,取值包括:"symbol", "narrowSymbol", "code", "name"。 |
-| unit | string | 是 | 是 | 单位名称,如:"meter","inch",“hectare”等。 |
-| unitDisplay | string | 是 | 是 | 单位的显示格式,取值包括:"long", "short", "medium"。 |
-| unitUsage | string | 是 | 是 | 单位的使用场景,取值包括:"default", "area-land-agricult", "area-land-commercl", "area-land-residntl", "length-person", "length-person-small", "length-rainfall", "length-road", "length-road-small", "length-snowfall", "length-vehicle", "length-visiblty", "length-visiblty-small", "length-person-informal", "length-person-small-informal", "length-road-informal", "speed-road-travel", "speed-wind", "temperature-person", "temperature-weather", "volume-vehicle-fuel"。 |
-| signDisplay | string | 是 | 是 | 数字符号的显示格式,取值包括:"auto", "never", "always", "expectZero"。 |
-| compactDisplay | string | 是 | 是 | 紧凑型的显示格式,取值包括:"long", "short"。 |
-| notation | string | 是 | 是 | 数字的格式化规格,取值包括:"standard", "scientific", "engineering", "compact"。 |
-| localeMatcher | string | 是 | 是 | 要使用的区域匹配算法,取值包括:"lookup", "best fit"。 |
-| style | string | 是 | 是 | 数字的显示格式,取值包括:"decimal", "currency", "percent", "unit"。 |
-| numberingSystem | string | 是 | 是 | 数字系统,取值包括:"adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho"。 |
-| useGrouping | boolean | 是 | 是 | 是否分组显示。 |
-| miniumumIntegerDigits | number | 是 | 是 | 表示要使用的最小整数位数,取值范围:1~21。 |
-| miniumumFractionDigits | number | 是 | 是 | 表示要使用的最小分数位数,取值范围:0~20。 |
-| maxiumumFractionDigits | number | 是 | 是 | 表示要使用的最大分数位数,取值范围:1~21。 |
-| miniumumSignificantDigits | number | 是 | 是 | 表示要使用的最低有效位数,取值范围:1~21。 |
-| maxiumumSignificantDigits | number | 是 | 是 | 表示要使用的最大有效位数,取值范围:1~21。 |
+| locale | string | 是 | 否 | 区域参数, 如:"zh-Hans-CN"。
**系统能力**:SystemCapability.Global.I18n |
+| currency | string | 是 | 是 | 货币单位, 如:"EUR","CNY","USD"等。
**系统能力**:SystemCapability.Global.I18n |
+| currencySign | string | 是 | 是 | 货币单位的符号显示,取值包括: "symbol","narrowSymbol","code","name" 。
**系统能力**:SystemCapability.Global.I18n |
+| currencyDisplay | string | 是 | 是 | 货币的显示方式,取值包括:"symbol", "narrowSymbol", "code", "name"。
**系统能力**:SystemCapability.Global.I18n |
+| unit | string | 是 | 是 | 单位名称,如:"meter","inch",“hectare”等。
**系统能力**:SystemCapability.Global.I18n |
+| unitDisplay | string | 是 | 是 | 单位的显示格式,取值包括:"long", "short", "medium"。
**系统能力**:SystemCapability.Global.I18n |
+| unitUsage | string | 是 | 是 | 单位的使用场景,取值包括:"default", "area-land-agricult", "area-land-commercl", "area-land-residntl", "length-person", "length-person-small", "length-rainfall", "length-road", "length-road-small", "length-snowfall", "length-vehicle", "length-visiblty", "length-visiblty-small", "length-person-informal", "length-person-small-informal", "length-road-informal", "speed-road-travel", "speed-wind", "temperature-person", "temperature-weather", "volume-vehicle-fuel"。
**系统能力**:SystemCapability.Global.I18n |
+| signDisplay | string | 是 | 是 | 数字符号的显示格式,取值包括:"auto", "never", "always", "expectZero"。
**系统能力**:SystemCapability.Global.I18n |
+| compactDisplay | string | 是 | 是 | 紧凑型的显示格式,取值包括:"long", "short"。
**系统能力**:SystemCapability.Global.I18n |
+| notation | string | 是 | 是 | 数字的格式化规格,取值包括:"standard", "scientific", "engineering", "compact"。
**系统能力**:SystemCapability.Global.I18n |
+| localeMatcher | string | 是 | 是 | 要使用的区域匹配算法,取值包括:"lookup", "best fit"。
**系统能力**:SystemCapability.Global.I18n |
+| style | string | 是 | 是 | 数字的显示格式,取值包括:"decimal", "currency", "percent", "unit"。
**系统能力**:SystemCapability.Global.I18n |
+| numberingSystem | string | 是 | 是 | 数字系统,取值包括:"adlm", "ahom", "arab", "arabext", "bali", "beng", "bhks", "brah", "cakm", "cham", "deva", "diak", "fullwide", "gong", "gonm", "gujr", "guru", "hanidec", "hmng", "hmnp", "java", "kali", "khmr", "knda", "lana", "lanatham", "laoo", "latn", "lepc", "limb", "mathbold", "mathdbl", "mathmono", "mathsanb", "mathsans", "mlym", "modi", "mong", "mroo", "mtei", "mymr", "mymrshan", "mymrtlng", "newa", "nkoo", "olck", "orya", "osma", "rohg", "saur", "segment", "shrd", "sind", "sinh", "sora", "sund", "takr", "talu", "tamldec", "telu", "thai", "tibt", "tirh", "vaii", "wara", "wcho"。
**系统能力**:SystemCapability.Global.I18n |
+| useGrouping | boolean | 是 | 是 | 是否分组显示。
**系统能力**:SystemCapability.Global.I18n |
+| miniumumIntegerDigits | number | 是 | 是 | 表示要使用的最小整数位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
+| miniumumFractionDigits | number | 是 | 是 | 表示要使用的最小分数位数,取值范围:0~20。
**系统能力**:SystemCapability.Global.I18n |
+| maxiumumFractionDigits | number | 是 | 是 | 表示要使用的最大分数位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
+| miniumumSignificantDigits | number | 是 | 是 | 表示要使用的最低有效位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
+| maxiumumSignificantDigits | number | 是 | 是 | 表示要使用的最大有效位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
## Collator8+
@@ -361,6 +382,8 @@ constructor()
创建排序对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 示例:
```
var collator = new Intl.Collator();
@@ -373,6 +396,8 @@ constructor(locale: string | Array<string>, options?: CollatorOptions)
创建排序对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
@@ -392,6 +417,8 @@ compare(first: string, second: string): number
依据Collator的排序策略对两个字符串进行比较。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -416,6 +443,8 @@ resolvedOptions(): CollatorOptions
返回Collator对象的属性。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -434,13 +463,13 @@ resolvedOptions(): CollatorOptions
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| localeMatcher | string | 是 | 是 | locale匹配算法,取值范围:"best fit", "lookup"。 |
-| usage | string | 是 | 是 | 比较的用途,取值范围:"sort", "search"。 |
-| sensitivity | string | 是 | 是 | 表示字符串中的哪些差异会导致非零结果值,取值范围:"base", "accent", "case", "variant"。 |
-| ignorePunctuation | boolean | 是 | 是 | 表示是否忽略标点符号,取值范围:true, false。 |
-| collation | string | 是 | 是 | 排序规则,取值范围:"big5han", "compat", "dict", "direct", "ducet", "eor", "gb2312", "phonebk", "phonetic", "pinyin", "reformed", "searchjl", "stroke", "trad", "unihan", "zhuyin"。 |
-| numeric | boolean | 是 | 是 | 是否使用数字排序,取值范围:true, false。 |
-| caseFirst | string | 是 | 是 | 表示大写、小写的排序顺序,取值范围:"upper", "lower", "false"。 |
+| localeMatcher | string | 是 | 是 | locale匹配算法,取值范围:"best fit", "lookup"。
**系统能力**:SystemCapability.Global.I18n |
+| usage | string | 是 | 是 | 比较的用途,取值范围:"sort", "search"。
**系统能力**:SystemCapability.Global.I18n |
+| sensitivity | string | 是 | 是 | 表示字符串中的哪些差异会导致非零结果值,取值范围:"base", "accent", "case", "variant"。
**系统能力**:SystemCapability.Global.I18n |
+| ignorePunctuation | boolean | 是 | 是 | 表示是否忽略标点符号,取值范围:true, false。
**系统能力**:SystemCapability.Global.I18n |
+| collation | string | 是 | 是 | 排序规则,取值范围:"big5han", "compat", "dict", "direct", "ducet", "eor", "gb2312", "phonebk", "phonetic", "pinyin", "reformed", "searchjl", "stroke", "trad", "unihan", "zhuyin"。
**系统能力**:SystemCapability.Global.I18n |
+| numeric | boolean | 是 | 是 | 是否使用数字排序,取值范围:true, false。
**系统能力**:SystemCapability.Global.I18n |
+| caseFirst | string | 是 | 是 | 表示大写、小写的排序顺序,取值范围:"upper", "lower", "false"。
**系统能力**:SystemCapability.Global.I18n |
## PluralRules8+
@@ -452,6 +481,8 @@ constructor()
创建PluralRules对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 示例:
```
var pluralRules = new Intl.PluralRules();
@@ -464,6 +495,8 @@ constructor(locale: string | Array<string>, options?: PluralRulesOptions)
创建PluralRules对象。
+**系统能力**:SystemCapability.Global.I18n
+
参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -482,6 +515,8 @@ select(n: number): string
返回一个字符串表示该数字的单复数类别。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -505,13 +540,13 @@ select(n: number): string
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best fit", "lookup"。 |
-| type | string | 是 | 是 | 排序的类型,取值包括:"cardinal", "ordinal"。 |
-| minimumIntegerDigits | number | 是 | 是 | 表示要使用的最小整数位数,取值范围:1~21。 |
-| minimumFractionDigits | number | 是 | 是 | 表示要使用的最小分数位数,取值范围:0~20。 |
-| maximumFractionDigits | number | 是 | 是 | 表示要使用的最大分数位数,取值范围:1~21。 |
-| minimumSignificantDigits | number | 是 | 是 | 表示要使用的最低有效位数,取值范围:1~21。 |
-| maximumSignificantDigits | number | 是 | 是 | 表示要使用的最大有效位数,取值范围:1~21。 |
+| localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best fit", "lookup"。
**系统能力**:SystemCapability.Global.I18n |
+| type | string | 是 | 是 | 排序的类型,取值包括:"cardinal", "ordinal"。
**系统能力**:SystemCapability.Global.I18n |
+| minimumIntegerDigits | number | 是 | 是 | 表示要使用的最小整数位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
+| minimumFractionDigits | number | 是 | 是 | 表示要使用的最小分数位数,取值范围:0~20。
**系统能力**:SystemCapability.Global.I18n |
+| maximumFractionDigits | number | 是 | 是 | 表示要使用的最大分数位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
+| minimumSignificantDigits | number | 是 | 是 | 表示要使用的最低有效位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
+| maximumSignificantDigits | number | 是 | 是 | 表示要使用的最大有效位数,取值范围:1~21。
**系统能力**:SystemCapability.Global.I18n |
## RelativeTimeFormat8+
@@ -523,6 +558,8 @@ constructor()
创建相对时间格式化对象。
+**系统能力**:SystemCapability.Global.I18n
+
- 示例:
```
var relativetimefmt = new Intl.RelativeTimeFormat();
@@ -535,6 +572,8 @@ constructor(locale: string | Array<string>, options?: RelativeTimeFormatIn
创建相对时间格式化对象。
+**系统能力**:SystemCapability.Global.I18n
+
参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -553,6 +592,8 @@ format(value: numeric, unit: string): string
依据locale和格式化选项,对value和unit进行格式化。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -577,6 +618,8 @@ formatToParts(value: numeric, unit: string): Array<Object>
返回一个对象数组,表示可用于自定义区域设置格式的相对时间格式。
+**系统能力**:SystemCapability.Global.I18n
+
- 参数:
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
@@ -601,6 +644,8 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions
获取RelativeTimeFormat对象的格式化选项。
+**系统能力**:SystemCapability.Global.I18n
+
- 返回值:
| 类型 | 说明 |
| -------- | -------- |
@@ -619,9 +664,9 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best fit", "lookup"。 |
-| numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always", "auto"。 |
-| style | string | 是 | 是 | 国际化消息的长度,取值包括:"long", "short", "narrow"。 |
+| localeMatcher | string | 是 | 是 | locale匹配算法,取值包括:"best fit", "lookup"。
**系统能力**:SystemCapability.Global.I18n |
+| numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always", "auto"。
**系统能力**:SystemCapability.Global.I18n |
+| style | string | 是 | 是 | 国际化消息的长度,取值包括:"long", "short", "narrow"。
**系统能力**:SystemCapability.Global.I18n |
## RelativeTimeFormatResolvedOptions8+
@@ -630,7 +675,7 @@ resolvedOptions(): RelativeTimeFormatResolvedOptions
| 名称 | 参数类型 | 可读 | 可写 | 说明 |
| -------- | -------- | -------- | -------- | -------- |
-| locale | string | 是 | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。 |
-| numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always", "auto"。 |
-| style | string | 是 | 是 | 国际化消息的长度,取值包括:"long", "short", "narrow"。 |
-| numberingSystem | string | 是 | 是 | 使用的数字系统。 |
+| locale | string | 是 | 是 | 包含区域设置信息的字符串,包括语言以及可选的脚本和区域。
**系统能力**:SystemCapability.Global.I18n |
+| numeric | string | 是 | 是 | 输出消息的格式,取值包括:"always", "auto"。
**系统能力**:SystemCapability.Global.I18n |
+| style | string | 是 | 是 | 国际化消息的长度,取值包括:"long", "short", "narrow"。
**系统能力**:SystemCapability.Global.I18n |
+| numberingSystem | string | 是 | 是 | 使用的数字系统。
**系统能力**:SystemCapability.Global.I18n |