Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
katydecorah committed Jun 6, 2024
2 parents 4a93341 + 8d17120 commit 64f7c28
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49367,18 +49367,14 @@ function getSeason(month) {
const season = seasons[month];
// Throw an error if the current month is not an end of season month
if (!season) {
throw new Error(`The current month does not match an end of season month.`);
throw new Error(`The current month (${month}) does not match an end of season month: ${Object.keys(seasons)}.`);
}
return season;
}
function getMonthYear() {
const today = new Date();
const month = process.env.MONTH
? parseInt(process.env.MONTH)
: today.getMonth();
const year = process.env.YEAR
? parseInt(process.env.YEAR)
: today.getFullYear();
const month = today.getMonth();
const year = today.getFullYear();
return {
month,
year,
Expand Down

0 comments on commit 64f7c28

Please sign in to comment.