You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2015/08/27 16:41:19 UTC
svn commit: r1698169 - /comdev/reporter.apache.org/trunk/site/render.js
Author: sebb
Date: Thu Aug 27 14:41:19 2015
New Revision: 1698169
URL: http://svn.apache.org/r1698169
Log:
s.match(/^(Every|Next) month/) does not seem to match Next month?
Modified:
comdev/reporter.apache.org/trunk/site/render.js
Modified: comdev/reporter.apache.org/trunk/site/render.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/render.js?rev=1698169&r1=1698168&r2=1698169&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/render.js (original)
+++ comdev/reporter.apache.org/trunk/site/render.js Thu Aug 27 14:41:19 2015
@@ -78,6 +78,10 @@ function getWednesdays(mo, y) {
return wednesdays;
}
+// s.match(/^(Every|Next) month/) does not seem to match Next month?
+function everyMonth(s) {
+ return s == 'Every month' || s.match(/^Next month/)
+}
// Called by: GetAsyncJSON("reportingcycles.json?" + Math.random(), [pmc, reportdate, json.pdata[pmc].name], setReportDate)
function setReportDate(json, x) {
@@ -94,7 +98,7 @@ function setReportDate(json, x) {
for (i in json[pmc]) {
sm = json[pmc][i]
for (x in m) {
- if (m[x] == sm || sm.match(/^(Every|Next) month/)) {
+ if (m[x] == sm || everyMonth(sm) {
dates.push(getWednesdays(x)[2])
}
}
@@ -104,7 +108,7 @@ function setReportDate(json, x) {
for (i in json[pmc]) {
sm = json[pmc][i]
for (x in m) {
- if (m[x] == sm || sm.match(/^(Every|Next) month/)) {
+ if (m[x] == sm || everyMonth(sm)) {
dates.push(getWednesdays(x)[2])
}
}