mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-14 23:26:15 -05:00
Assert voting range based on UTC not local
This commit is contained in:
@@ -42,7 +42,7 @@ export function rangeToMonthYear(range: { startDate: Date; endDate: Date }) {
|
||||
export function seasonToVotingRange(season: RankingSeason) {
|
||||
const { ends: date } = season;
|
||||
|
||||
if (date.getDay() !== 0) {
|
||||
if (date.getUTCDay() !== 0) {
|
||||
throw new Error("End date is not a Sunday.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user