code dump frontend
This commit is contained in:
14
frontend/lib/convertUtc.ts
Normal file
14
frontend/lib/convertUtc.ts
Normal file
@ -0,0 +1,14 @@
|
||||
export const convertUtc = (utcTimestamp: string): string => {
|
||||
const utcTimeZone: string = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
return new Date(utcTimestamp).toLocaleString("en-US", {
|
||||
day: "numeric",
|
||||
month: "numeric",
|
||||
year: "numeric",
|
||||
hour: "numeric",
|
||||
minute: "numeric",
|
||||
hourCycle: "h24",
|
||||
timeZone: utcTimeZone,
|
||||
});
|
||||
};
|
||||
|
||||
const validateTime = (parsedUtcTimestamp: any) => {};
|
Reference in New Issue
Block a user