Month names in zodiac-sign, Number.parseInt/isNaN

This commit is contained in:
Daniel Odendahl Jr
2018-02-21 23:58:35 +00:00
parent 30b81c143e
commit 3c90676e30
14 changed files with 62 additions and 30 deletions
+2 -2
View File
@@ -21,8 +21,8 @@ module.exports = class DaysUntilCommand extends Command {
}
run(msg, { date }) {
const month = parseInt(date[0], 10);
const day = parseInt(date[1], 10);
const month = Number.parseInt(date[0], 10);
const day = Number.parseInt(date[1], 10);
if (!month || !day) return msg.reply('Invalid date.');
const now = new Date();
let year = now.getMonth() + 1 <= month ? now.getFullYear() : now.getFullYear() + 1;