export function formatTime(time) {
    let formatter = new Intl.DateTimeFormat(undefined, {
        weekday: 'long',
        year: 'numeric',
        month: 'numeric',
        day: 'numeric',
        hour: 'numeric',
        minute: 'numeric',
        second: 'numeric',
        hour12: true,
        timeZone: 'UTC'
    });
    let hourPart = formatter.formatToParts(time).filter((part) => part.type === 'hour')[0];
    let minutePart = formatter.formatToParts(time).filter((part) => part.type === 'minute')[0];
    let dayPeriod = formatter.formatToParts(time).filter((part) => part.type === 'dayperiod')[0];

    console.log(hourPart, minutePart, dayPeriod);
    return `${hourPart['value']}:${minutePart['value']} ${dayPeriod['value']}`;
}
@@ -40,164 +40,19 @@
 let 
-formatter = new Intl.DateTimeFormat(undefined, %7B%0A        weekday: 'long',%0A        year: 'numeric',%0A        month: 'numeric',%0A        day: 'numeric',%0A       
+options = %7B
  hou
@@ -64,24 +64,16 @@
 umeric',
-%0A       
  minute:
@@ -86,89 +86,10 @@
 ric'
-,%0A        second: 'numeric',%0A        hour12: true,%0A        timeZone: 'UTC'%0A   
  %7D
-)
 ;%0A  
@@ -98,414 +98,107 @@
 let 
-hourPart = formatter.formatToParts(time).filter((part) =%3E part.type === 'hour')%5B0%5D;%0A    let minutePart = formatter.formatToParts(time).filter((part) =%3E part.type === 'minute')%5B0%5D
+dateTimeFormat = new Intl.DateTimeFormat(undefined, options)
 ;%0A    
-let dayPeriod = f
+return dateTimeF
 ormat
-ter
 .format
-ToParts(time).filter((part) =%3E part.type === 'dayperiod')%5B0%5D;%0A%0A    console.log(hourPart, minutePart, dayPeriod);%0A    return %60$%7BhourPart%5B'value'%5D%7D:$%7BminutePart%5B'value'%5D%7D $%7BdayPeriod%5B'value'%5D%7D%60
+(time)
 ;%0A%7D

change time formatter