This commit is contained in:
Dragon Fire
2020-10-26 12:22:15 -04:00
parent be510449a9
commit 416cb5d470
+5 -5
View File
@@ -12,10 +12,10 @@ module.exports = class YearProgressCommand extends Command {
}
run(msg) {
const today = new Date();
const start = new Date(today.getFullYear(), 0, 1);
const end = new Date(today.getFullYear() + 1, 0, 1);
const percent = (Math.abs(today - start) / Math.abs(end - start)) * 100;
return msg.say(`The year ${now.getFullYear()} is **${percent}%** complete!`);
const today = new Date();
const start = new Date(today.getFullYear(), 0, 1);
const end = new Date(today.getFullYear() + 1, 0, 1);
const percent = (Math.abs(today - start) / Math.abs(end - start)) * 100;
return msg.say(`The year ${now.getFullYear()} is **${percent}%** complete!`);
}
};