You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/09/12 20:23:00 UTC

[incubator-ponymail-foal] branch master updated: getMonth is off by one

This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a66485  getMonth is off by one
7a66485 is described below

commit 7a66485f94642c4f6a3f047c3275d39efa032734
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sun Sep 12 15:22:52 2021 -0500

    getMonth is off by one
---
 webui/js/ponymail.js                | 2 +-
 webui/js/source/sidebar-calendar.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index e8bfe4a..b87c101 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -3330,7 +3330,7 @@ function renderCalendar(FY, FM, LY, LM) {
     
     let now = new Date();
     let CY = now.getFullYear();
-    let CM = now.getMonth();
+    let CM = now.getMonth() + 1;
     let SY = Math.min(LY, CY); // last year in calendar, considering current date
     // If Last Year is into the future, set Last Month to this one.
     if (LY > CY) {
diff --git a/webui/js/source/sidebar-calendar.js b/webui/js/source/sidebar-calendar.js
index 2ee8ea3..2bb356c 100644
--- a/webui/js/source/sidebar-calendar.js
+++ b/webui/js/source/sidebar-calendar.js
@@ -30,7 +30,7 @@ function renderCalendar(FY, FM, LY, LM) {
     
     let now = new Date();
     let CY = now.getFullYear();
-    let CM = now.getMonth();
+    let CM = now.getMonth() + 1;
     let SY = Math.min(LY, CY); // last year in calendar, considering current date
     // If Last Year is into the future, set Last Month to this one.
     if (LY > CY) {