active[1](item.id)}>
${startDate.Month} ${startDate.Date}
${item.name}
${startDate.Hours}:${startDate.Minutes} ${startDate.M}
${
active[0] == item.id ? html`
Active` : null
}
${item.id}
`;
};
/** @type {(inDate:string)=>Boxcast.Date} */
const DateParse = (inDateString) =>
{
let date = new Date(inDateString);
/** @type {Boxcast.Date} */
let obj = {
Zone: date.toString().match(/\(([A-Za-z\s].*)\)/),
Day: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][date.getDay()],
Month: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][date.getMonth()],
Date: date.getDate(),
Hours: date.getHours(),
Minutes: date.getMinutes(),
};
obj.Zone = obj.Zone ? obj.Zone[1] : "local time";
obj.M = obj.Hours >= 12 ? "PM" : "AM";
obj.Hours %= 12;
if(obj.Hours == 0){ obj.Hours = 12; }
if(obj.Minutes < 10){ obj.Minutes = "0"+obj.Minutes; }
return obj;
};
export default App;