From b7205da1ddf1532224ec837bbca494674dabad1a Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Sun, 16 Apr 2023 14:04:31 +0200 Subject: [PATCH] Add ability to use weeks in timer command Closes #33 --- util/timer/parseTime.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/timer/parseTime.js b/util/timer/parseTime.js index bae30eb..aabda6f 100644 --- a/util/timer/parseTime.js +++ b/util/timer/parseTime.js @@ -17,6 +17,9 @@ module.exports = function(time, currentUnixTime){ case "T": // TODO: Make it so that I can have multiple letters per case, so that "TS" would work here. timeInSeconds = timeInSeconds - currentUnixTime; break; + case "W": + timeInSeconds = timeInSeconds * 86400 * 7; + break; default: timeInSeconds = NaN; if(time.includes(':'))