mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
globalize - Add timeZone property to DateFormatterOptions interface and loadTimeZone method to GlobalizeStatic interface.
This commit is contained in:
13
types/globalize/index.d.ts
vendored
13
types/globalize/index.d.ts
vendored
@@ -30,6 +30,12 @@ interface DateFormatterOptions {
|
||||
* Note this is NOT recommended for i18n in general. Use skeleton instead.
|
||||
*/
|
||||
raw?: string;
|
||||
|
||||
/**
|
||||
* String based on the time zone names of the IANA time zone database,
|
||||
* such as "Asia/Shanghai", "Asia/Kolkata", "America/New_York".
|
||||
*/
|
||||
timeZone?: string;
|
||||
}
|
||||
|
||||
interface CommonNumberFormatterOptions {
|
||||
@@ -126,6 +132,13 @@ interface GlobalizeStatic {
|
||||
|
||||
cldr: Cldr.CldrStatic;
|
||||
|
||||
/**
|
||||
* Globalize.loadTimeZone ( ianaTzData, ... )
|
||||
* This method allows you to load IANA time zone data to enable options.timeZone feature on date formatters and parsers.
|
||||
* @param {Object} ianaTzData A JSON object with zdumped IANA timezone data. Get the data via https://github.com/rxaviers/iana-tz-data
|
||||
*/
|
||||
loadTimeZone(ianaTzData: Object): void;
|
||||
|
||||
/**
|
||||
* Globalize.load( json, ... )
|
||||
* @param {Object} [JSON]
|
||||
|
||||
Reference in New Issue
Block a user