Supply current unix timestamp with parseTime
This commit is contained in:
parent
ec5993e585
commit
22d1cbd570
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ module.exports = async function (message, args) {
|
||||||
let currentUnixTime = Math.floor(new Date() / 1000);
|
let currentUnixTime = Math.floor(new Date() / 1000);
|
||||||
|
|
||||||
let timeInSeconds;
|
let timeInSeconds;
|
||||||
if(!isNaN(Date.parse(args[0])) && isNaN(parseTime(args[0]))){
|
if(!isNaN(Date.parse(args[0])) && isNaN(parseTime(args[0], currentUnixTime))){
|
||||||
timeInSeconds = timeUntil(args[0]).totalInSeconds;
|
timeInSeconds = timeUntil(args[0]).totalInSeconds;
|
||||||
if(timeInSeconds < 0){
|
if(timeInSeconds < 0){
|
||||||
return "The date must not be in the past."
|
return "The date must not be in the past."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue