mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 06:37:32 +02:00
Month names in zodiac-sign, Number.parseInt/isNaN
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user