mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 07:46:43 +02:00
BEep
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = class DaysUntilCommand extends Command {
|
||||
|
||||
run(msg, { date }) {
|
||||
const month = parseInt(date[0], 10);
|
||||
const day = parseInt(date[1], 10);
|
||||
const day = date[1] ? parseInt(date[1], 10) : NaN;
|
||||
const now = new Date();
|
||||
let year = now.getMonth() + 1 <= month ? now.getFullYear() : now.getFullYear() + 1;
|
||||
if (month === now.getMonth() + 1 && now.getDate() >= day) ++year;
|
||||
|
||||
Reference in New Issue
Block a user