community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1871644 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/reportdate.js wizard-beta.js
Date Mon, 16 Dec 2019 10:22:41 GMT
Author: humbedooh
Date: Mon Dec 16 10:22:40 2019
New Revision: 1871644

URL: http://svn.apache.org/viewvc?rev=1871644&view=rev
Log:
replace time diff with 'TODAY' if due today.

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.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=1871644&r1=1871643&r2=1871644&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 Mon Dec 16 10:22:40
2019
@@ -97,7 +97,9 @@ function getReportDate(json, pmc, dateOn
 			nextdate.setDate(nextdate.getDate() - 2); // Due 48 hours prior to board meeting.
 			let rightnow = new Date();
 			if (nextdate && Math.abs(rightnow - nextdate) < (86400*2*1000)) {
-				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " ("  +
moment(nextdate).fromNow() + ")");
+				let fromnow = moment(nextdate).fromNow();
+				if (nextdate && Math.abs(rightnow - nextdate) < (86400*1000)) fromnow = "TODAY";
+				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " ("  +
fromnow + ")");
 			}
 			return nextdate ? (nextdate.toDateString() + " ("  + moment(nextdate).fromNow() + ")"):
"Unknown(?)";
 		} else {

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js?rev=1871644&r1=1871643&r2=1871644&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js Mon Dec 16 10:22:40 2019
@@ -1996,7 +1996,9 @@ function getReportDate(json, pmc, dateOn
 			nextdate.setDate(nextdate.getDate() - 2); // Due 48 hours prior to board meeting.
 			let rightnow = new Date();
 			if (nextdate && Math.abs(rightnow - nextdate) < (86400*2*1000)) {
-				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " ("  +
moment(nextdate).fromNow() + ")");
+				let fromnow = moment(nextdate).fromNow();
+				if (nextdate && Math.abs(rightnow - nextdate) < (86400*1000)) fromnow = "TODAY";
+				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " ("  +
fromnow + ")");
 			}
 			return nextdate ? (nextdate.toDateString() + " ("  + moment(nextdate).fromNow() + ")"):
"Unknown(?)";
 		} else {



Mime
View raw message