permalinks icon indicating copy to clipboard operation
permalinks copied to clipboard

Use Moment to test date validity

Open adamliptrot opened this issue 8 years ago • 2 comments

Rather than test the val against a Date type, using Moment's own isValid() - as it's to determine whether to pass to Moment or not seems sensible and is more forgiving of different formats found in FrontMatter

adamliptrot avatar Nov 11 '15 16:11 adamliptrot

Thanks for the PR.

Could you resolve the conflicts or create a new PR based off master?

woodyrew avatar Jul 21 '18 13:07 woodyrew

npm test produces:

Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.

woodyrew avatar Jul 24 '18 17:07 woodyrew