Skip to content

Commit

Permalink
Change all times from military to am/pm
Browse files Browse the repository at this point in the history
  • Loading branch information
patudom committed Apr 6, 2024
1 parent 6d71cb5 commit 88f5213
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SolarEclipse2024.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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} <br/>Eclipse time (UTC): ${d[1]} <br/>Duration: ${eclipseDuration}`;
return {
Expand Down Expand Up @@ -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)}`;
}
Expand All @@ -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}`;
}
Expand Down

0 comments on commit 88f5213

Please sign in to comment.