diff --git a/src/app/pages/scarlet-game-jam/scarlet-game-jam/scarlet-game-jam-page.component.ts b/src/app/pages/scarlet-game-jam/scarlet-game-jam/scarlet-game-jam-page.component.ts index 31028b4..cf537e4 100644 --- a/src/app/pages/scarlet-game-jam/scarlet-game-jam/scarlet-game-jam-page.component.ts +++ b/src/app/pages/scarlet-game-jam/scarlet-game-jam/scarlet-game-jam-page.component.ts @@ -34,8 +34,8 @@ export class ScarletGameJamPageComponent implements OnInit { getSemesterString = getSemesterString; ngOnInit(): void { - let startDateTimeStart = convertHourMinute12to24(this.startDateTime.split('-')[0]); - let startDateObj = new Date(this.startDate + ', ' + new Date().getFullYear() + ' ' + startDateTimeStart + ' EST'); + let startDateTime24Hr = convertHourMinute12to24(this.startDateTime.split('-')[0]); + let startDateObj = new Date(this.startDate + ', ' + new Date().getFullYear() + ' ' + startDateTime24Hr + ' EST'); this.eventActive = startDateObj < new Date(); let finalDateSeconds = startDateObj.getTime() / 1000; diff --git a/src/app/pages/scarlet-showcase/scarlet-showcase/scarlet-showcase-page.component.ts b/src/app/pages/scarlet-showcase/scarlet-showcase/scarlet-showcase-page.component.ts index b2757e2..8214d76 100644 --- a/src/app/pages/scarlet-showcase/scarlet-showcase/scarlet-showcase-page.component.ts +++ b/src/app/pages/scarlet-showcase/scarlet-showcase/scarlet-showcase-page.component.ts @@ -1,6 +1,6 @@ import { AfterViewInit, Component } from '@angular/core'; import { BreakpointManagerService } from '@app/services/breakpoint-manager.service'; -import { getSemesterString } from '@src/app/utils/duration-utils'; +import { convertHourMinute12to24, getSemesterString } from '@src/app/utils/duration-utils'; import { SettingsService } from '@src/_settings'; declare var FlipDown: any; @@ -14,7 +14,7 @@ declare var FlipDown: any; }) export class ScarletShowcasePageComponent implements AfterViewInit { startDate: string = 'Dec 8'; - startTime: string = '5pm'; + startTime: string = '5:00 pm'; eventActive: boolean = false; @@ -25,9 +25,11 @@ export class ScarletShowcasePageComponent implements AfterViewInit { getSemesterString = getSemesterString; ngAfterViewInit(): void { + let startTime24Hr = convertHourMinute12to24(this.startTime); if (!this.eventActive) { var finalDateSeconds = - new Date(this.startDate + ', ' + new Date().getFullYear() + ' ' + this.startTime + ' EST').getTime() / 1000; + new Date(this.startDate + ', ' + new Date().getFullYear() + ' ' + startTime24Hr + ' EST').getTime() / 1000; + console.log('using file seconds: ', finalDateSeconds); var flipdown = new FlipDown(finalDateSeconds, 'sgj-countdown', { theme: 'dark', }).start();