timerender: Avoid dateStyle option missing in Safari < 14.1.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-11-20 15:15:00 -08:00
committed by Tim Abbott
parent 4f06fc6a84
commit 23ab667bbb
2 changed files with 9 additions and 2 deletions

View File

@@ -55,7 +55,12 @@ export function get_format_options_for_type(type: DateOrTimeFormat): Intl.DateTi
};
const weekday_format_options: Intl.DateTimeFormatOptions = {weekday: "long"};
const full_format_options: Intl.DateTimeFormatOptions = {dateStyle: "full"};
const full_format_options: Intl.DateTimeFormatOptions = {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric",
};
const dayofyear_format_options: Intl.DateTimeFormatOptions = {day: "numeric", month: "short"};
const dayofyear_year_format_options: Intl.DateTimeFormatOptions = {