es-shims / es5-shim

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

All V8 versions have the Date shim loaded. #451

Closed Xotic750 closed 7 years ago

Xotic750 commented 7 years ago

I noticed that when loading ES5-shim, that Date was being shimmed, this meant that when subclassing using ES2015 class, I wasn't getting the expected strings when inspecting the subclass. While not a show stopper, I wanted to find out why. Turns out that V8, while not apparently being out of spec (the spec allows you to deal with it as you see fit), falls to the side of "it may not be 100% IS0 8601 but can we parse it anyway" where other engines say "it looks like IS0 8601 but it's not valid".

https://bugs.chromium.org/p/chromium/issues/detail?id=757198

Just something to be aware of.

ljharb commented 7 years ago

Noted.

For the time being, es5-shim will continue to operate this way; when 3 out of the 4 browsers change to make a choice, we can change, if needed, to match it.