From: Iskren Chernev Date: Tue, 6 May 2014 16:56:23 +0000 (-0700) Subject: Mark human weekday as invalid when parsing X-Git-Tag: 2.7.0~23^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=711f13bcf138817e2c2d2589525858be405f53ec;p=thirdparty%2Fmoment.git Mark human weekday as invalid when parsing --- diff --git a/moment.js b/moment.js index a26528686..7b08fe422 100644 --- a/moment.js +++ b/moment.js @@ -1161,6 +1161,7 @@ config._useUTC = true; config._tzm = timezoneMinutesFromString(input); break; + // WEEKDAY - human case 'dd': case 'ddd': case 'dddd': @@ -1169,8 +1170,11 @@ if (a != null) { config._w = config._w || {}; config._w['d'] = a; + } else { + config._pf.invalidWeekday = input; } break; + // WEEK, WEEK DAY - numeric case 'w': case 'ww': case 'W': @@ -1180,6 +1184,7 @@ case 'E': token = token.substr(0, 1); /* falls through */ + // WEEK YEAR case 'gggg': case 'GGGG': case 'GGGGG':