From 88f52132aed143673403f7dbb1b13864034ae786 Mon Sep 17 00:00:00 2001 From: Pat Udomprasert Date: Fri, 5 Apr 2024 20:12:00 -0400 Subject: [PATCH] Change all times from military to am/pm --- src/SolarEclipse2024.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SolarEclipse2024.vue b/src/SolarEclipse2024.vue index e05437e..065c84b 100644 --- a/src/SolarEclipse2024.vue +++ b/src/SolarEclipse2024.vue @@ -1990,7 +1990,7 @@ function parseEclipsePath(csv: string) { const eclipseDuration = d[18]; // content for the popup : eclipse time (UTC) and duration const tz = tzlookup(centerLine.latitudeDeg, centerLine.longitudeDeg); - const localTimeString = formatInTimeZone(utc.getTime(), tz, "HH:mm (zzz)"); + const localTimeString = formatInTimeZone(utc.getTime(), tz, "h:mm aa (zzz)"); const popupContent = `Eclipse time (local): ${localTimeString}
Eclipse time (UTC): ${d[1]}
Duration: ${eclipseDuration}`; return { @@ -2508,10 +2508,10 @@ export default defineComponent({ ["A", "Annular"], ])).get(type); - // const maxTimeString = formatInTimeZone(maxTime[0], this.selectedTimezone, "HH:mm (zzz)"); + // const maxTimeString = formatInTimeZone(maxTime[0], this.selectedTimezone, "h:mm aa (zzz)"); if (type == "T") { - const begins = formatInTimeZone(this.eclipsePrediction.centralStart[0], this.selectedTimezone, "HH:mm:ss (zzz)"); + const begins = formatInTimeZone(this.eclipsePrediction.centralStart[0], this.selectedTimezone, "h:mm:ss aa (zzz)"); if (this.$vuetify.display.xs) { return `Totality starts: ${begins} Duration: ${spaceHMS(duration)}`; } @@ -2521,7 +2521,7 @@ export default defineComponent({ if (duration === '') { // get the duration of the partial eclipse - const starting = formatInTimeZone(this.eclipsePrediction.partialStart[0], this.selectedTimezone, "HH:mm (zzz)"); + const starting = formatInTimeZone(this.eclipsePrediction.partialStart[0], this.selectedTimezone, "h:mm aa (zzz)"); if (this.$vuetify.display.xs) { return `${typeString} starts: ${starting}`; }