diff --git a/commands/events/calendar.js b/commands/events/calendar.js index 58991cf9..15b7975c 100644 --- a/commands/events/calendar.js +++ b/commands/events/calendar.js @@ -22,7 +22,7 @@ module.exports = class CalendarCommand extends Command { key: 'year', prompt: 'What year would you like to get the calendar of?', type: 'integer', - min: 100 + min: 1 } ] }); @@ -37,6 +37,7 @@ module.exports = class CalendarCommand extends Command { `; display += '\n'; const startDay = new Date(year, month - 1, 1).getDay(); + if (year > 100) startDay.setFullYear(year); for (let i = 0; i < startDay; i++) { display += ' '; } diff --git a/commands/events/days-since.js b/commands/events/days-since.js index 05a30109..17911251 100644 --- a/commands/events/days-since.js +++ b/commands/events/days-since.js @@ -26,7 +26,7 @@ module.exports = class DaysSinceCommand extends Command { key: 'year', prompt: 'What year would you like to get the days since?', type: 'integer', - min: 100 + min: 1 } ] }); @@ -35,6 +35,7 @@ module.exports = class DaysSinceCommand extends Command { run(msg, { month, day, year }) { const now = new Date(); const past = new Date(year, month - 1, day); + if (year > 100) past.setFullYear(year); const pastFormat = moment.utc(past).format('dddd, MMMM Do, YYYY'); const time = moment.duration(now - past); return msg.say(`There have been ${time.format('Y [years,] M [months and] d [days]')} since ${pastFormat}!`);