Add ability to use weeks in timer command

Closes #33
This commit is contained in:
SileNce5k 2023-04-16 14:04:31 +02:00
parent 2015344caf
commit b7205da1dd
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -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. case "T": // TODO: Make it so that I can have multiple letters per case, so that "TS" would work here.
timeInSeconds = timeInSeconds - currentUnixTime; timeInSeconds = timeInSeconds - currentUnixTime;
break; break;
case "W":
timeInSeconds = timeInSeconds * 86400 * 7;
break;
default: default:
timeInSeconds = NaN; timeInSeconds = NaN;
if(time.includes(':')) if(time.includes(':'))