gr2m / moment-parseformat

A moment.js plugin to extract the format of a date/time string
http://gr2m.github.io/moment-parseformat
Apache License 2.0
45 stars 30 forks source link

30/01/16 → MM/DD/YY #59

Open wurmr opened 8 years ago

wurmr commented 8 years ago

moment.parseFormat('30/01/16') parsed to MM/DD/YY, I expected: DD/MM/YY

wurmr commented 8 years ago

This parsing works if the year is > 31.

moment.parseFormat('30/01/81') yields the expected results.

gr2m commented 8 years ago

oh wow, good catch! Could you send a pull request for it? You can add a testcase here: https://github.com/gr2m/moment-parseformat/blob/master/test/moment-parseformat-test.js and then fix it in https://github.com/gr2m/moment-parseformat/blob/master/lib/parseformat.js

Please let me know if you have any questions, especially if you did not yet send a pull request before, I’m happy to assist