From 790d27aa09cdbf17997929780d6afb9777a9542b Mon Sep 17 00:00:00 2001 From: "devid.farinelli@gmail.com" Date: Mon, 11 Mar 2019 20:41:18 +0100 Subject: [PATCH] feat(opencollective prompt): extract weekday to variable --- bin/opencollective.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/opencollective.js b/bin/opencollective.js index d11b2679ea1..c542a868a84 100644 --- a/bin/opencollective.js +++ b/bin/opencollective.js @@ -34,7 +34,8 @@ function printBadge() { const now = new Date(); -if (now.getDay() === 1) { +const MONDAY = 1; +if (now.getDay() === MONDAY) { const lastPrintFile = path.resolve(__dirname, "../.lastocprint"); fs.readFile(lastPrintFile, "utf8", (err, lastPrint = 0) => { if (err && err.code !== "ENOENT") return;