From 8c66119aa5caa71c5708c071c375ccb3042d976d Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Tue, 20 Sep 2022 21:38:06 +0200 Subject: [PATCH] fixed timerange --- mapvote.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mapvote.js b/mapvote.js index eec859e..4328c02 100644 --- a/mapvote.js +++ b/mapvote.js @@ -205,7 +205,7 @@ export default class MapVote extends DiscordBasePlugin { const midnight = new Date(0, 0, 0, 0, 0) const tfEnd = new Date(0, 0, 0, ...tfEndSplit) const tfEnd2 = new Date(0, 0, 0, ...tfEndSplit) - return (tfStart <= timeNow && timeNow < tfEnd) || (tfStart > tfEnd && ((tfStart <= timeNow && timeNow < midnight) || (midnight <= timeNow && timeNow < tfEnd)) + return (tfStart <= timeNow && timeNow < tfEnd) || (tfStart > tfEnd && ((tfStart <= timeNow && timeNow < midnight) || (midnight <= timeNow && timeNow < tfEnd))) } } async checkUpdates(callback) {