Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change all times from military to am/pm #158

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading