• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the Globalization Subsystem
2
3The table below lists the APIs changes of the globalization subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| rawFileDescriptor | RawFileDescriptor | length: number; | Added|
10| rawFileDescriptor | RawFileDescriptor | offset: number; | Added|
11| rawFileDescriptor | RawFileDescriptor | fd: number; | Added|
12| ohos.resourceManager | ResourceManager | release(); | Added|
13| ohos.resourceManager | ResourceManager | closeRawFileDescriptor(path: string, callback: AsyncCallback\<void>): void;<br>closeRawFileDescriptor(path: string): Promise\<void>; | Added|
14| ohos.resourceManager | ResourceManager | getRawFileDescriptor(path: string, callback: AsyncCallback\<RawFileDescriptor>): void;<br>getRawFileDescriptor(path: string): Promise\<RawFileDescriptor>; | Added|
15| ohos.resourceManager | ResourceManager | getRawFile(path: string, callback: AsyncCallback\<Uint8Array>): void;<br>getRawFile(path: string): Promise\<Uint8Array>; | Added|
16| ohos.resourceManager | resourceManager | getResourceManager(callback: AsyncCallback\<ResourceManager>): void;<br>getResourceManager(bundleName: string, callback: AsyncCallback\<ResourceManager>): void;<br>getResourceManager(): Promise\<ResourceManager>;<br>getResourceManager(bundleName: string): Promise\<ResourceManager>; | Added|
17| ohos.intl | RelativeTimeFormat | resolvedOptions(): RelativeTimeFormatResolvedOptions; | Added|
18| ohos.intl | RelativeTimeFormat | formatToParts(value: number, unit: string): Array\<object>; | Added|
19| ohos.intl | RelativeTimeFormat | format(value: number, unit: string): string; | Added|
20| ohos.intl | RelativeTimeFormat | constructor(); | Added|
21| ohos.intl | RelativeTimeFormatResolvedOptions | numberingSystem: string; | Added|
22| ohos.intl | RelativeTimeFormatResolvedOptions | numeric: string; | Added|
23| ohos.intl | RelativeTimeFormatResolvedOptions | style: string; | Added|
24| ohos.intl | RelativeTimeFormatResolvedOptions | locale: string; | Added|
25| ohos.intl | RelativeTimeFormatInputOptions | style: string; | Added|
26| ohos.intl | RelativeTimeFormatInputOptions | numeric: string; | Added|
27| ohos.intl | RelativeTimeFormatInputOptions | localeMatcher: string; | Added|
28| ohos.intl | PluralRules | select(n: number): string; | Added|
29| ohos.intl | PluralRules | constructor(); | Added|
30| ohos.intl | PluralRulesOptions | maximumSignificantDigits: number; | Added|
31| ohos.intl | PluralRulesOptions | minimumSignificantDigits: number; | Added|
32| ohos.intl | PluralRulesOptions | maximumFractionDigits: number; | Added|
33| ohos.intl | PluralRulesOptions | minimumFractionDigits: number; | Added|
34| ohos.intl | PluralRulesOptions | minimumIntegerDigits: number; | Added|
35| ohos.intl | PluralRulesOptions | type: string; | Added|
36| ohos.intl | PluralRulesOptions | localeMatcher: string; | Added|
37| ohos.intl | Collator | resolvedOptions(): CollatorOptions; | Added|
38| ohos.intl | Collator | compare(first: string, second: string): number; | Added|
39| ohos.intl | Collator | constructor(); | Added|
40| ohos.intl | CollatorOptions | caseFirst: string; | Added|
41| ohos.intl | CollatorOptions | numeric: boolean; | Added|
42| ohos.intl | CollatorOptions | collation: string; | Added|
43| ohos.intl | CollatorOptions | ignorePunctuation: boolean; | Added|
44| ohos.intl | CollatorOptions | sensitivity: string; | Added|
45| ohos.intl | CollatorOptions | usage: string; | Added|
46| ohos.intl | CollatorOptions | localeMatcher: string; | Added|
47| ohos.intl | NumberOptions | unitUsage: string | Added|
48| ohos.intl | LocaleOptions | caseFirst: string; | Added|
49| ohos.intl | LocaleOptions | numeric: boolean; | Added|
50| ohos.intl | LocaleOptions | numberingSystem: string; | Added|
51| ohos.intl | LocaleOptions | hourCycle: string; | Added|
52| ohos.intl | LocaleOptions | collation: string; | Added|
53| ohos.intl | LocaleOptions | calendar: string; | Added|
54| ohos.i18n | TimeZone | getOffset(date?: number): number; | Added|
55| ohos.i18n | TimeZone | getRawOffset(): number; | Added|
56| ohos.i18n | TimeZone | getDisplayName(locale?: string, isDST?: boolean): string; | Added|
57| ohos.i18n | TimeZone | getID(): string; | Added|
58| ohos.i18n | i18n | getTimeZone(zoneID?: string): TimeZone; | Added|
59| ohos.i18n | i18n | getFirstPreferredLanguage(): string; | Added|
60| ohos.i18n | i18n | getPreferredLanguageList(): Array\<string>; | Added|
61| ohos.i18n | i18n | removePreferredLanguage(index: number): boolean; | Added|
62| ohos.i18n | i18n | addPreferredLanguage(language: string, index?: number): boolean; | Added|
63| ohos.i18n | i18n | set24HourClock(option: boolean): boolean; | Added|
64| ohos.i18n | i18n | is24HourClock(): boolean; | Added|
65| ohos.i18n | Character | getType(char: string): string; | Added|
66| ohos.i18n | Character | isUpperCase(char: string): boolean; | Added|
67| ohos.i18n | Character | isLowerCase(char: string): boolean; | Added|
68| ohos.i18n | Character | isLetter(char: string): boolean; | Added|
69| ohos.i18n | Character | isIdeograph(char: string): boolean; | Added|
70| ohos.i18n | Character | isRTL(char: string): boolean; | Added|
71| ohos.i18n | Character | isWhitespace(char: string): boolean; | Added|
72| ohos.i18n | Character | isSpaceChar(char: string): boolean; | Added|
73| ohos.i18n | Character | isDigit(char: string): boolean; | Added|
74| ohos.i18n | IndexUtil | getIndex(text: string): string; | Added|
75| ohos.i18n | IndexUtil | addLocale(locale: string): void; | Added|
76| ohos.i18n | IndexUtil | getIndexList(): Array\<string>; | Added|
77| ohos.i18n | i18n | getInstance(locale?:string): IndexUtil; | Added|
78| ohos.i18n | BreakIterator | isBoundary(offset: number): boolean; | Added|
79| ohos.i18n | BreakIterator | getLineBreakText(): string; | Added|
80| ohos.i18n | BreakIterator | following(offset: number): number; | Added|
81| ohos.i18n | BreakIterator | setLineBreakText(text: string): void; | Added|
82| ohos.i18n | BreakIterator | previous(): number; | Added|
83| ohos.i18n | BreakIterator | next(index?: number): number; | Added|
84| ohos.i18n | BreakIterator | last(): number; | Added|
85| ohos.i18n | BreakIterator | first(): number; | Added|
86| ohos.i18n | BreakIterator | current(): number; | Added|
87| ohos.i18n | i18n | getLineInstance(locale: string): BreakIterator; | Added|
88| ohos.i18n | i18n | isRTL(locale: string): boolean; | Added|
89| ohos.i18n | Calendar | isWeekend(date?: Date): boolean; | Added|
90| ohos.i18n | Calendar | getDisplayName(locale: string): string; | Added|
91| ohos.i18n | Calendar | get(field: string): number; | Added|
92| ohos.i18n | Calendar | setMinimalDaysInFirstWeek(value: number): void; | Added|
93| ohos.i18n | Calendar | getMinimalDaysInFirstWeek(): number; | Added|
94| ohos.i18n | Calendar | setFirstDayOfWeek(value: number): void; | Added|
95| ohos.i18n | Calendar | getFirstDayOfWeek(): number; | Added|
96| ohos.i18n | Calendar | getTimeZone(): string; | Added|
97| ohos.i18n | Calendar | setTimeZone(timezone: string): void; | Added|
98| ohos.i18n | Calendar | set(year: number, month: number, date:number, hour?: number, minute?: number, second?: number): void; | Added|
99| ohos.i18n | Calendar | setTime(date: Date): void;<br>setTime(time: number): void; | Added|
100| ohos.i18n | i18n | getCalendar(locale: string, type?: string): Calendar; | Added|
101| ohos.i18n | PhoneNumberFormat | format(number: string): string; | Added|
102| ohos.i18n | PhoneNumberFormat | isValidNumber(number: string): boolean; | Added|
103| ohos.i18n | PhoneNumberFormat | constructor(country: string, options?: PhoneNumberFormatOptions); | Added|
104| ohos.i18n | PhoneNumberFormatOptions | type: string; | Added|
105| ohos.i18n | UnitInfo | measureSystem: string | Added|
106| ohos.i18n | UnitInfo | unit: string | Added|
107| ohos.i18n | Util | unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string; | Added|
108