Fix error page when ends_on date is null
Closes #936 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
a54b879c2d
commit
d4dfba48d8
@ -56,7 +56,7 @@ const SHORT_TIME_FORMAT_OPTIONS: DateTimeFormatOptions = {
|
|||||||
|
|
||||||
function formatDateTimeString(
|
function formatDateTimeString(
|
||||||
value: string,
|
value: string,
|
||||||
timeZone: string | undefined = undefined,
|
timeZone: string | null | undefined = undefined,
|
||||||
showTime = true,
|
showTime = true,
|
||||||
dateFormat = "long"
|
dateFormat = "long"
|
||||||
): string {
|
): string {
|
||||||
@ -68,7 +68,7 @@ function formatDateTimeString(
|
|||||||
options = {
|
options = {
|
||||||
...options,
|
...options,
|
||||||
...(isLongFormat ? LONG_TIME_FORMAT_OPTIONS : SHORT_TIME_FORMAT_OPTIONS),
|
...(isLongFormat ? LONG_TIME_FORMAT_OPTIONS : SHORT_TIME_FORMAT_OPTIONS),
|
||||||
timeZone,
|
timeZone: timeZone || undefined,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const format = new Intl.DateTimeFormat(locale(), options);
|
const format = new Intl.DateTimeFormat(locale(), options);
|
||||||
|
Loading…
Reference in New Issue
Block a user