Skip to content

Commit 8babe21

Browse files
Change game time to 75 mins for team cowboy (#44)
* Change game time to 75 mins for team cowboy * Remove seconds from end time * add teamcowboy to spellcheck --------- Co-authored-by: Shawn Collinge <[email protected]>
1 parent 6618bbe commit 8babe21

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
"Mountlake",
2525
"Lynnwood",
2626
"Colour",
27+
"Teamcowboy"
2728
]
2829
}

src/transformers/DBLGameToTeamCowboyGame.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ import { SnokingGame } from "../../typings/snokingData";
22
import { DBLGame } from "../../typings/dblAppData";
33
import moment from "moment";
44

5-
const BENCH_APP_DATE_FORMAT_STRING = "YYYY-MM-DD";
6-
const END_TIME_FORMAT = "hh:mm:SS A";
5+
const TEAMCOWBOY_DATE_FORMAT_STRING = "YYYY-MM-DD";
6+
const END_TIME_FORMAT = "hh:mm A";
77

88
export function DBLGameToTeamCowboyGame(snokingGame: SnokingGame, teamId: string): DBLGame {
99
const isHome = teamId == `${snokingGame.teamHomeSeasonId}`;
10-
const endTime = moment(snokingGame.dateTime).add(90, "minutes");
10+
const endTime = moment(snokingGame.dateTime).add(75, "minutes");
1111
return {
1212
Type: "GAME",
13-
Date: moment(snokingGame.dateTime).format(BENCH_APP_DATE_FORMAT_STRING),
13+
Date: moment(snokingGame.dateTime).format(TEAMCOWBOY_DATE_FORMAT_STRING),
1414
Time: snokingGame.time,
1515
Title: isHome ? snokingGame.teamAwayName : snokingGame.teamHomeName,
1616
HomeOrAway: isHome ? "Home" : "Away",
1717
rinkName: snokingGame.rinkName,
1818
jerseyColour: isHome ? "White" : "Black",
19-
endDate: moment(endTime).format(BENCH_APP_DATE_FORMAT_STRING),
19+
endDate: moment(endTime).format(TEAMCOWBOY_DATE_FORMAT_STRING),
2020
endTime: moment(endTime).format(END_TIME_FORMAT),
2121
};
2222
}

0 commit comments

Comments
 (0)