summaryrefslogtreecommitdiff
path: root/src/loslib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/loslib.js')
-rw-r--r--src/loslib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loslib.js b/src/loslib.js
index c282175..d20873d 100644
--- a/src/loslib.js
+++ b/src/loslib.js
@@ -73,7 +73,7 @@ const setallfields = function(L, time, utc) {
setfield(L, "min", !utc ? time.getMinutes() : time.getUTCMinutes());
setfield(L, "hour", !utc ? time.getHours() : time.getUTCHours());
setfield(L, "day", !utc ? time.getDate() : time.getUTCDate());
- setfield(L, "month", !utc ? time.getMonth() : time.getUTCMonth());
+ setfield(L, "month", (!utc ? time.getMonth() : time.getUTCMonth()) + 1);
setfield(L, "year", !utc ? time.getFullYear() : time.getUTCFullYear());
setfield(L, "wday", !utc ? time.getDay() : time.getUTCDay());
let now = new Date();