Why is moment.js allowing date with one digit year when using strict parsing?

女生的网名这么多〃 提交于 2019-12-01 23:42:05

This was a known issue for past versions of Moment.js: YYYY-MM-DD with 3 digit year returns true for isValid().

It was fixed in December 2013, and your code works as expected with the most recent version of the library. Version 2.3.1 was released in October 2013 and does not include this fix.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!