Interface DateTimeFormatOptions
interface DateTimeFormatOptions {
calendar?: string;
dateStyle?:
| "short"
| "long"
| "full"
| "medium";
day?: "numeric" | "2-digit";
dayPeriod?: "short" | "long" | "narrow";
era?: "short" | "long" | "narrow";
formatMatcher?: "best fit" | "basic";
fractionalSecondDigits?: 1 | 2 | 3;
hour?: "numeric" | "2-digit";
hour12?: boolean;
hourCycle?:
| "h11"
| "h12"
| "h23"
| "h24";
localeMatcher?: "lookup" | "best fit";
minute?: "numeric" | "2-digit";
month?:
| "short"
| "long"
| "narrow"
| "numeric"
| "2-digit";
numberingSystem?: string;
second?: "numeric" | "2-digit";
timeStyle?:
| "short"
| "long"
| "full"
| "medium";
timeZone?: string;
timeZoneName?:
| "short"
| "long"
| "shortOffset"
| "longOffset"
| "shortGeneric"
| "longGeneric";
weekday?: "short" | "long" | "narrow";
year?: "numeric" | "2-digit";
}
calendar?: string;
dateStyle?:
| "short"
| "long"
| "full"
| "medium";
day?: "numeric" | "2-digit";
dayPeriod?: "short" | "long" | "narrow";
era?: "short" | "long" | "narrow";
formatMatcher?: "best fit" | "basic";
fractionalSecondDigits?: 1 | 2 | 3;
hour?: "numeric" | "2-digit";
hour12?: boolean;
hourCycle?:
| "h11"
| "h12"
| "h23"
| "h24";
localeMatcher?: "lookup" | "best fit";
minute?: "numeric" | "2-digit";
month?:
| "short"
| "long"
| "narrow"
| "numeric"
| "2-digit";
numberingSystem?: string;
second?: "numeric" | "2-digit";
timeStyle?:
| "short"
| "long"
| "full"
| "medium";
timeZone?: string;
timeZoneName?:
| "short"
| "long"
| "shortOffset"
| "longOffset"
| "shortGeneric"
| "longGeneric";
weekday?: "short" | "long" | "narrow";
year?: "numeric" | "2-digit";
}
Properties
Optional
calendar
calendar?: string
Optional
dateStyle
dateStyle ?:
| "short"
| "long"
| "full"
| "medium"
| "short"
| "long"
| "full"
| "medium"
Optional
day
day?: "numeric" | "2-digit"
Optional
dayPeriod
dayPeriod ?: "short" | "long" | "narrow"
Optional
era
era?: "short" | "long" | "narrow"
Optional
formatMatcher
formatMatcher ?: "best fit" | "basic"
Optional
fractionalSecondDigits
fractionalSecondDigits ?: 1 | 2 | 3
Optional
hour
hour?: "numeric" | "2-digit"
Optional
hour12
hour12?: boolean
Optional
hourCycle
hourCycle ?:
| "h11"
| "h12"
| "h23"
| "h24"
| "h11"
| "h12"
| "h23"
| "h24"
Optional
localeMatcher
localeMatcher ?: "lookup" | "best fit"
Optional
minute
minute?: "numeric" | "2-digit"
Optional
month
month?:
| "short"
| "long"
| "narrow"
| "numeric"
| "2-digit"
| "short"
| "long"
| "narrow"
| "numeric"
| "2-digit"
Optional
numberingSystem
numberingSystem ?: string
Optional
second
second?: "numeric" | "2-digit"
Optional
timeStyle
timeStyle ?:
| "short"
| "long"
| "full"
| "medium"
| "short"
| "long"
| "full"
| "medium"
Optional
timeZone
timeZone ?: string
Optional
timeZoneName
timeZoneName ?:
| "short"
| "long"
| "shortOffset"
| "longOffset"
| "shortGeneric"
| "longGeneric"
| "short"
| "long"
| "shortOffset"
| "longOffset"
| "shortGeneric"
| "longGeneric"
Optional
weekday
weekday?: "short" | "long" | "narrow"
Optional
year
year?: "numeric" | "2-digit"