timezonecomplete
Version:
DateTime, TimeZone, Duration and Period library aimed at providing a consistent and complete date-time interface, away from the original JavaScript Date class.
171 lines (170 loc) • 4.7 kB
TypeScript
/**
* Copyright(c) 2017 ABB Switzerland Ltd.
*/
/**
* Fixed day period rules
*/
export interface DayPeriod {
am: string;
pm: string;
midnight: string;
noon: string;
}
/**
* Locale for formatting
*/
export interface Locale {
/**
* Era names: AD, BC
*/
eraNarrow: [string, string];
eraWide: [string, string];
eraAbbreviated: [string, string];
/**
* The letter indicating a quarter e.g. "Q" (becomes Q1, Q2, Q3, Q4)
*/
quarterLetter: string;
/**
* The word for 'quarter'
*/
quarterWord: string;
/**
* Quarter abbreviations e.g. 1st, 2nd, 3rd, 4th
*/
quarterAbbreviations: string[];
/**
* In some languages, quarters need different names when used stand-alone
*/
standAloneQuarterLetter: string;
standAloneQuarterWord: string;
standAloneQuarterAbbreviations: string[];
/**
* Month names
*/
longMonthNames: string[];
/**
* Three-letter month names
*/
shortMonthNames: string[];
/**
* Month letters
*/
monthLetters: string[];
/**
* In some languages, months need different names when used stand-alone
*/
standAloneLongMonthNames: string[];
standAloneShortMonthNames: string[];
standAloneMonthLetters: string[];
/**
* Week day names, starting with sunday
*/
longWeekdayNames: string[];
shortWeekdayNames: string[];
weekdayTwoLetters: string[];
weekdayLetters: string[];
/**
* Fixed day period names (AM/PM/noon/midnight, format 'a' and 'b')
*/
dayPeriodNarrow: DayPeriod;
dayPeriodWide: DayPeriod;
dayPeriodAbbreviated: DayPeriod;
}
export interface PartialLocale {
/**
* Era names: AD, BC
*/
eraNarrow?: [string, string];
eraWide?: [string, string];
eraAbbreviated?: [string, string];
/**
* The letter indicating a quarter e.g. "Q" (becomes Q1, Q2, Q3, Q4)
*/
quarterLetter?: string;
/**
* The word for 'quarter'
*/
quarterWord?: string;
/**
* Quarter abbreviations e.g. 1st, 2nd, 3rd, 4th
*/
quarterAbbreviations?: string[];
/**
* In some languages, quarters need different names when used stand-alone
*/
standAloneQuarterLetter?: string;
standAloneQuarterWord?: string;
standAloneQuarterAbbreviations?: string[];
/**
* Month names
*/
longMonthNames?: string[];
/**
* Three-letter month names
*/
shortMonthNames?: string[];
/**
* Month letters
*/
monthLetters?: string[];
/**
* In some languages, months need different names when used stand-alone
*/
standAloneLongMonthNames?: string[];
standAloneShortMonthNames?: string[];
standAloneMonthLetters?: string[];
/**
* Week day names, starting with sunday
*/
longWeekdayNames?: string[];
shortWeekdayNames?: string[];
weekdayTwoLetters?: string[];
weekdayLetters?: string[];
/**
* Fixed day period names (AM/PM/noon/midnight, format 'a' and 'b')
*/
dayPeriodNarrow?: DayPeriod;
dayPeriodWide?: DayPeriod;
dayPeriodAbbreviated?: DayPeriod;
}
export declare const ERA_NAMES_NARROW: [string, string];
export declare const ERA_NAMES_WIDE: [string, string];
export declare const ERA_NAMES_ABBREVIATED: [string, string];
export declare const QUARTER_LETTER: string;
export declare const QUARTER_WORD: string;
export declare const QUARTER_ABBREVIATIONS: string[];
/**
* In some languages, different words are necessary for stand-alone quarter names
*/
export declare const STAND_ALONE_QUARTER_LETTER: string;
export declare const STAND_ALONE_QUARTER_WORD: string;
export declare const STAND_ALONE_QUARTER_ABBREVIATIONS: string[];
export declare const LONG_MONTH_NAMES: string[];
export declare const SHORT_MONTH_NAMES: string[];
export declare const MONTH_LETTERS: string[];
export declare const STAND_ALONE_LONG_MONTH_NAMES: string[];
export declare const STAND_ALONE_SHORT_MONTH_NAMES: string[];
export declare const STAND_ALONE_MONTH_LETTERS: string[];
export declare const LONG_WEEKDAY_NAMES: string[];
export declare const SHORT_WEEKDAY_NAMES: string[];
export declare const WEEKDAY_TWO_LETTERS: string[];
export declare const WEEKDAY_LETTERS: string[];
export declare const DAY_PERIODS_ABBREVIATED: {
am: string;
pm: string;
noon: string;
midnight: string;
};
export declare const DAY_PERIODS_WIDE: {
am: string;
pm: string;
noon: string;
midnight: string;
};
export declare const DAY_PERIODS_NARROW: {
am: string;
pm: string;
noon: string;
midnight: string;
};
export declare const DEFAULT_LOCALE: Locale;