]> git.ipfire.org Git - thirdparty/moment.git/commit
Fix #3500: ISO 8601 parsing should match the full string, not the beginning of the...
authorMark Stosberg <mark@rideamigos.com>
Thu, 13 Oct 2016 21:04:54 +0000 (17:04 -0400)
committerIskren Chernev <iskren.chernev@gmail.com>
Sun, 6 Nov 2016 09:37:33 +0000 (01:37 -0800)
commit945985998ce3b83f3cd675925bfb93b1b3bb9e14
treed6124ab3b0541f42be1fa62872852cb3e4205483
parent47cffae674b5a001b8a6a55ad9676beedf880303
Fix #3500: ISO 8601 parsing should match the full string, not the beginning of the string.

Because of the nature of the how related tests are put together, the newly added test
*passes* even before the fix is applied.

This happens because the "non-ISO" tests are tested against the same ISO which is being fixed.

Because the broken regex is also used in the test, it allowed the non ISO date to be validated
before the fix.
src/lib/create/from-string.js
src/test/moment/create.js