community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1877615 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/reportdate.js wizard.js
Date Tue, 12 May 2020 01:12:49 GMT
Author: humbedooh
Date: Tue May 12 01:12:49 2020
New Revision: 1877615

URL: http://svn.apache.org/viewvc?rev=1877615&view=rev
Log:
wrap in moment

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js?rev=1877615&r1=1877614&r2=1877615&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js Tue May 12 01:12:49
2020
@@ -98,9 +98,9 @@ function getReportDate(json, pmc, dateOn
 			xdate.setDate(xdate.getDate() - 7); // Due one week prior to meeting.
 			let rightnow = new Date();
 			 // If less than 7 days till due date (14 days prior to meeting), light up the christmas
trees
-			if (xdate.diff(rightnow, 'days') < 14) {
+			if (moment(xdate).diff(rightnow, 'days') < 14) {
 				if (pdata && pdata.filed[pmc] == true) return new HTML('span', {style: { color:
'#396'}}, xdate.toDateString() + " (Report filed)");
-				if (xdate.diff(rightnow, 'days') > 0) {
+				if (moment(xdate).diff(rightnow, 'days') > 0) {
 					return new HTML('span', {style: { color: '#711'}}, xdate.toDateString() + " (Report
is due in %s)".format(moment(xdate).fromNow()));
 				}
 				return new HTML('span', {style: { color: '#711'}}, xdate.toDateString() + " (Report is
due)");

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1877615&r1=1877614&r2=1877615&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Tue May 12 01:12:49 2020
@@ -1998,9 +1998,9 @@ function getReportDate(json, pmc, dateOn
 			xdate.setDate(xdate.getDate() - 7); // Due one week prior to meeting.
 			let rightnow = new Date();
 			 // If less than 7 days till due date (14 days prior to meeting), light up the christmas
trees
-			if (xdate.diff(rightnow, 'days') < 14) {
+			if (moment(xdate).diff(rightnow, 'days') < 14) {
 				if (pdata && pdata.filed[pmc] == true) return new HTML('span', {style: { color:
'#396'}}, xdate.toDateString() + " (Report filed)");
-				if (xdate.diff(rightnow, 'days') > 0) {
+				if (moment(xdate).diff(rightnow, 'days') > 0) {
 					return new HTML('span', {style: { color: '#711'}}, xdate.toDateString() + " (Report
is due in %s)".format(moment(xdate).fromNow()));
 				}
 				return new HTML('span', {style: { color: '#711'}}, xdate.toDateString() + " (Report is
due)");



Mime
View raw message