Closed onecreative closed 9 years ago
yes, 9-17-80
is parsed correctly, 3-1-81
should be parsed as D-M-Y
, as 81
can only be a year, and the default fallback is DMY
.
It works as expected when you do
moment.parseFormat('3-1-81', {preferredOrder: 'MDY'})
Fixed via https://github.com/gr2m/moment.parseFormat/commit/5d3230648c41933075d34b49f3ad4c9eed342223
It now parses to D-M-YY
. If you prefer the Month-Day-Year
order, pass {preferredOrder: 'MDY'}
moment.parseFormat('3-1-81')
parsed toYY-M-D
, I expected:M-D-YY
Looks like this is still a problem. I checked 9-17-80, and it worked, but I'm guessing that was because of the 17.