Skip to content

Commit

Permalink
Fix Ticket shows runs as "coming up in X" when behind schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
zoton2 committed Feb 18, 2024
1 parent 0bf7619 commit 4320feb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/graphics/omnibar/components/Ticker/UpcomingRun.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export default class extends Vue {
getRunTotalPlayers = SpeedcontrolUtilBrowser.getRunTotalPlayers;
get when(): string {
return this.run.scheduledS
// Show relative time string if possible and run is actually in the future.
return this.run.scheduledS && this.run.scheduledS > (Date.now() / 1000)
? `in about ${dayjs.utc().to(dayjs.unix(this.run.scheduledS), true)}`
: 'soon';
}
Expand Down

0 comments on commit 4320feb

Please sign in to comment.