From b4cb1997870d44d2191660f34ce998748e1b80ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Tue, 23 Feb 2021 08:37:34 +0200 Subject: [PATCH] Fix datestamp (damn javascript and 0-indexed months) --- background.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/background.js b/background.js index 832dbf8..a1cc6d5 100644 --- a/background.js +++ b/background.js @@ -48,7 +48,7 @@ function bookmarkTabs() { bookmarkingTabs = true; let now = new Date(); - let dateString = [now.getFullYear().toString(), now.getMonth().toString().padStart(2, '0'), now.getDate().toString().padStart(2, '0')].join('-'); + let dateString = [now.getFullYear().toString(), (now.getMonth() + 1).toString().padStart(2, '0'), now.getDate().toString().padStart(2, '0')].join('-'); let timeString = [now.getHours().toString().padStart(2, '0'), now.getMinutes().toString().padStart(2, '0')].join(':'); setActionStatus('Bookmarking tabs…', 'processing', function() { getOrCreateFolder(function(rootId) {