Removed junk.

This commit is contained in:
Mike Cao 2024-08-20 14:16:35 -07:00
parent 511fec2ddb
commit caa9da9166

View File

@ -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)}`
); );
}; };