fix: Cal Video sidebar not showing meeting time in timezone (#22821)
* Pass params as object to `formatToLocalizedTime` * Refactor videos-single-view * Refactor bookings-single-view
This commit is contained in:
1 parent
f81bb92beb
commit
91932212e3
3 files changed
+51
-21
No files matched your search
@@ -79,13 +79,19 @@ export const formatToLocalizedDate = (
|
||||
* given Date object and locale. Undefined values mean the defaults
|
||||
* associated with the browser's current locale will be used.
|
||||
*/
|
||||
export const formatToLocalizedTime = (
|
||||
date: Date | Dayjs,
|
||||
locale: string | undefined = undefined,
|
||||
timeStyle: Intl.DateTimeFormatOptions["timeStyle"] = "short",
|
||||
hour12: Intl.DateTimeFormatOptions["hour12"] = undefined,
|
||||
timeZone?: string
|
||||
) => formatLocalizedDateTime(date, { timeStyle, hour12, timeZone }, locale);
|
||||
export const formatToLocalizedTime = ({
|
||||
date,
|
||||
locale = undefined,
|
||||
timeStyle = "short",
|
||||
hour12 = undefined,
|
||||
timeZone,
|
||||
}: {
|
||||
date: Date | Dayjs;
|
||||
locale?: string | undefined;
|
||||
timeStyle?: Intl.DateTimeFormatOptions["timeStyle"];
|
||||
hour12?: Intl.DateTimeFormatOptions["hour12"];
|
||||
timeZone?: string;
|
||||
}) => formatLocalizedDateTime(date, { timeStyle, hour12, timeZone }, locale);
|
||||
|
||||
/**
|
||||
* Returns a translated timezone based on the given Date object and
|
||||
|
||||
Reference in new issue
Block a user