es-shims / es5-shim

ECMAScript 5 compatibility shims for legacy (and modern) JavaScript engines
MIT License
7.12k stars 899 forks source link

Invalid Date on Safari #481

Closed Semigradsky closed 2 years ago

Semigradsky commented 2 years ago
> new Date('1900-01-01T00:00:00.000')
< Invalid Date

es5-shim@4.6.5 Safari 15.3

CircleTan commented 2 years ago

你的邮件我已收到了,谢谢。

ljharb commented 2 years ago

This date works fine without the shim, and I do see that it's invalid with it.

Date parsing is wildly underspecified; that said, this date parses natively in Safari and Chrome and Firefox, so the es5-shim shouldn't be breaking it (it only breaks in Safari, to be clear)