Removed junk.
This commit is contained in:
@@ -14,14 +14,12 @@ export function useTimezone() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const formatTimezoneDate = (date: string, pattern: string) => {
|
const formatTimezoneDate = (date: string, pattern: string) => {
|
||||||
return (
|
return formatInTimeZone(
|
||||||
formatInTimeZone(
|
/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{3})?Z$/.test(date)
|
||||||
/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{3})?Z$/.test(date)
|
? date
|
||||||
? date
|
: date.split(' ').join('T') + 'Z',
|
||||||
: date.split(' ').join('T') + 'Z',
|
timezone,
|
||||||
timezone,
|
pattern,
|
||||||
pattern,
|
|
||||||
) + `, ${date}, ${pattern}, ${timezone}, ${formatInTimeZone(date, timezone, pattern)}`
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user