mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-12 05:35:16 -05:00
Add 18 hour closing time for registration (#2092)
* Add more tournament closing times * Add 18 hour closing time for registration Closes #2091. * Remove extra space
This commit is contained in:
parent
aec350281e
commit
da032e001e
|
|
@ -93,6 +93,7 @@ export const REG_CLOSES_AT_OPTIONS = [
|
|||
"3h",
|
||||
"6h",
|
||||
"12h",
|
||||
"18h",
|
||||
"24h",
|
||||
"48h",
|
||||
"72h",
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ export function regClosesAtDate({
|
|||
return new Date(startTime.getTime() - 360 * 60 * 1000);
|
||||
case "12h":
|
||||
return new Date(startTime.getTime() - 720 * 60 * 1000);
|
||||
case "18h":
|
||||
return new Date(startTime.getTime() - 1080 * 60 * 1000);
|
||||
case "24h":
|
||||
return new Date(startTime.getTime() - 1440 * 60 * 1000);
|
||||
case "48h":
|
||||
|
|
@ -78,6 +80,8 @@ export function regClosesAtToDisplayName(closesAt: RegClosesAtOption) {
|
|||
return "6 hours";
|
||||
case "12h":
|
||||
return "12 hours";
|
||||
case "18h":
|
||||
return "18 hours";
|
||||
case "24h":
|
||||
return "24 hours";
|
||||
case "48h":
|
||||
|
|
@ -108,6 +112,7 @@ export function datesToRegClosesAt({
|
|||
if (diff === 180 * 60 * 1000) return "3h";
|
||||
if (diff === 360 * 60 * 1000) return "6h";
|
||||
if (diff === 720 * 60 * 1000) return "12h";
|
||||
if (diff === 1080 * 60 * 1000) return "18h";
|
||||
if (diff === 1440 * 60 * 1000) return "24h";
|
||||
if (diff === 2880 * 60 * 1000) return "48h";
|
||||
if (diff === 4320 * 60 * 1000) return "72h";
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user