type-analyzer icon indicating copy to clipboard operation
type-analyzer copied to clipboard

Date `12/31/17` incorrectly given format of `YYYY/M/D`

Open matthias-ccri opened this issue 3 years ago • 0 comments

A date string like 12/31/17 is incorrectly given the YYYY/M/D format, whereas it should be M/D/YYYY.

It looks like there are unit tests that try to cover this: https://github.com/uber-web/type-analyzer/blob/617c783384143a403e80e50f934a306ec4b8da0c/test/time-test.js#L48-L52 but not all of the dates are actually tested. If you change the order of the dates and make 12/31/17 first, the test fails.

matthias-ccri avatar Apr 30 '22 02:04 matthias-ccri