]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Revoked weekday check and test
authorTGJG-XPS\TracyG <tracyg.gilmore@gmail.com>
Sat, 4 Feb 2017 13:25:46 +0000 (13:25 +0000)
committerIskren Chernev <iskren.chernev@gmail.com>
Sun, 12 Mar 2017 00:11:46 +0000 (02:11 +0200)
src/lib/create/from-string.js
src/test/moment/create.js

index e9a5e0f44a85b40b79fe6fa4c809a829752a08ba..579b2aba5bea96a440cf141aa9dfbd620a909147 100644 (file)
@@ -163,6 +163,7 @@ export function configFromRFC2822(config) {
 
         // TODO Confirm the given day-of-week is consistent with the day-of-month-year
         //  NB: Needs an instance of moment, created from the date element of the input string.
+        /*
         if (match[1]) { // day of week given
             console.log('[' + match[1].substr(0,3) + ']', moment(match[2], dateFormat).format('ddd'));
             var momentDay = moment(match[2], dateFormat).format('ddd');
@@ -172,7 +173,7 @@ export function configFromRFC2822(config) {
                 return;
             }
         }
-       
+        */
         getParsingFlags(config).rfc2822 = true;
 
         switch (match[5].length) {
index 6acf8518c749b08cfff9d26267f0e28a68455df7..65217b37e3fa01255da8a4b25184a042fb7e5fe5 100644 (file)
@@ -476,10 +476,10 @@ test('parsing RFC 2822', function (assert) {
 test('non RFC 2822 strings', function (assert) {
     assert.ok(!moment('Tue. 01 Nov 2016 01:23:45 GMT', moment.RFC_2822, true).isValid(),
         'RFC2822 datetime with all options but invalid day delimiter');
-    /* */
+    /* TODO Confirm the given day-of-week is consistent with the day-of-month-year
     assert.ok(!moment('Mon, 01 Nov 2016 01:23:45 GMT', moment.RFC_2822, true).isValid(),
         'RFC2822 datetime with mismatching Day (week v date)');
-    /* */
+    */
 });
 
 test('parsing iso', function (assert) {