Skip to content

Commit

Permalink
fix(40806): Add missing options and possible values of DateTimeFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
blfpd committed Dec 9, 2020
1 parent 69143ec commit 581b896
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 24 deletions.
31 changes: 19 additions & 12 deletions src/lib/es5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4318,19 +4318,26 @@ declare namespace Intl {
};

interface DateTimeFormatOptions {
localeMatcher?: string;
weekday?: string;
era?: string;
year?: string;
month?: string;
day?: string;
hour?: string;
minute?: string;
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12?: boolean;
dateStyle?: "full" | "long" | "medium" | "short";
timeStyle?: "full" | "long" | "medium" | "short";
calendar?: "buddhist" | "chinese" | " coptic" | "ethiopia" | "ethiopic" | "gregory" | " hebrew" | "indian" | "islamic" | "iso8601" | " japanese" | "persian" | "roc";
dayPeriod?: "narrow" | "short" | " long";
numberingSystem?: "arab" | "arabext" | " bali" | "beng" | "deva" | "fullwide" | " gujr" | "guru" | "hanidec" | "khmr" | " knda" | "laoo" | "latn" | "limb" | "mlym" | " mong" | "mymr" | "orya" | "tamldec" | " telu" | "thai" | "tibt";
localeMatcher?: "best fit" | "lookup";
timeZone?: string;
hour12?: boolean;
hourCycle?: "h11" | "h12" | "h23" | "h24";
formatMatcher?: "best fit" | "basic";
weekday?: "long" | "short" | "narrow";
era?: "long" | "short" | "narrow";
year?: "numeric" | "2-digit";
month?: "numeric" | "2-digit" |"long" | "short" | "narrow";
day?: "numeric" | "2-digit";
hour?: "numeric" | "2-digit";
minute?: "numeric" | "2-digit";
second?: "numeric" | "2-digit";
fractionalSecondDigits?: 0 | 1 | 2 | 3;
timeZoneName?: "long" | "short";
}

interface ResolvedDateTimeFormatOptions {
Expand Down
31 changes: 19 additions & 12 deletions tests/lib/lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3938,19 +3938,26 @@ declare module Intl {
}

interface DateTimeFormatOptions {
localeMatcher?: string;
weekday?: string;
era?: string;
year?: string;
month?: string;
day?: string;
hour?: string;
minute?: string;
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12?: boolean;
dateStyle?: "full" | "long" | "medium" | "short";
timeStyle?: "full" | "long" | "medium" | "short";
calendar?: "buddhist" | "chinese" | " coptic" | "ethiopia" | "ethiopic" | "gregory" | " hebrew" | "indian" | "islamic" | "iso8601" | " japanese" | "persian" | "roc";
dayPeriod?: "narrow" | "short" | " long";
numberingSystem?: "arab" | "arabext" | " bali" | "beng" | "deva" | "fullwide" | " gujr" | "guru" | "hanidec" | "khmr" | " knda" | "laoo" | "latn" | "limb" | "mlym" | " mong" | "mymr" | "orya" | "tamldec" | " telu" | "thai" | "tibt";
localeMatcher?: "best fit" | "lookup";
timeZone?: string;
hour12?: boolean;
hourCycle?: "h11" | "h12" | "h23" | "h24";
formatMatcher?: "best fit" | "basic";
weekday?: "long" | "short" | "narrow";
era?: "long" | "short" | "narrow";
year?: "numeric" | "2-digit";
month?: "numeric" | "2-digit" |"long" | "short" | "narrow";
day?: "numeric" | "2-digit";
hour?: "numeric" | "2-digit";
minute?: "numeric" | "2-digit";
second?: "numeric" | "2-digit";
fractionalSecondDigits?: 0 | 1 | 2 | 3;
timeZoneName?: "long" | "short";
}

interface ResolvedDateTimeFormatOptions {
Expand Down

0 comments on commit 581b896

Please sign in to comment.