aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2017-11-03 16:04:48 +0100
committerRahiel Kasim <rahielkasim@gmail.com>2017-11-03 16:04:48 +0100
commit9de209df7404c8005ec917dbf8b90b61581fa6a1 (patch)
tree229eefa937bdd3f0d5e522683d1df94849e6f463
parentc3e0e7eebfa572ee93a681db07761e3e209b04c6 (diff)
fix month in timestamp
getUTCMonth() returns the month as 0-11
-rw-r--r--src/archiveror.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archiveror.js b/src/archiveror.js
index 8055f22..b38c670 100644
--- a/src/archiveror.js
+++ b/src/archiveror.js
@@ -245,7 +245,7 @@ function makeFilename(title) {
function getTimestamp() {
let date = new Date();
let y = date.getUTCFullYear();
- let m = date.getUTCMonth().toString().padStart(2, "0");
+ let m = (date.getUTCMonth() + 1).toString().padStart(2, "0");
let d = date.getUTCDate().toString().padStart(2, "0");
let H = date.getUTCHours().toString().padStart(2, "0");
let M = date.getUTCMinutes().toString().padStart(2, "0");