From 821111df5ebed18982f64bc20ccfb100267e8e55 Mon Sep 17 00:00:00 2001 From: Hippo Date: Wed, 1 Jan 2020 21:33:57 +0530 Subject: [PATCH] Change upload path month to be 1-indexed instead of 0-indexed Jan=1 and Dec=12, not Jan=0 and Dec=11. Because that's just too confusing ;P --- functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.js b/functions.js index 5aa0c25..9cca308 100644 --- a/functions.js +++ b/functions.js @@ -104,9 +104,9 @@ const pushToGhost = async (postSlug) => { // Decide WebDAV upload path current_date = new Date() - var uploadPath = path.join( + const uploadPath = path.join( current_date.getUTCFullYear().toString(), - current_date.getUTCMonth().toString(), + (current_date.getUTCMonth() + 1).toString(), postSlug )