add localeoption

Signed-off-by: sunyaozu <sunyaozu@huawei.com>
This commit is contained in:
sunyaozu 2022-01-20 16:00:27 +08:00
parent c3c433e38e
commit fd1f70d287

52
api/@ohos.intl.d.ts vendored
View File

@ -21,6 +21,56 @@
* @devices phone, tablet, tv, wearable, car
*/
declare namespace intl {
/**
* Provides the options of Locale.
*
* @since 8
* @sysCap SystemCapability.I18N
*/
export interface LocaleOptions {
/**
* Indicates the calendar.
*
* @since 8
*/
calendar: string;
/**
* Indicates the collation.
*
* @since 8
*/
collation: string;
/**
* Indicates the hourCycle.
*
* @since 8
*/
hourCycle: string;
/**
* Indicates the numberingSystem.
*
* @since 8
*/
numberingSystem: string;
/**
* Indicates the numeric.
*
* @since 8
*/
numeric: boolean;
/**
* Indicates the caseFirst.
*
* @since 8
*/
caseFirst: string;
}
/**
* Provides APIs for obtaining locale information.
*
@ -36,7 +86,7 @@ export class Locale {
* the language and optionally the script and region.
* @since 6
*/
constructor(locale?: string);
constructor(locale?: string, options?: LocaleOptions);
/**
* Indicates the language of the locale.