Use new internationalization API when possible
The interesting part for jsTimeZoneDetect is that the browser can now return the actual IANA time zone string. According to the spec, this is supposed to happen with this code:
But Chrome apparently hasn't implemented that yet. However, you can still get it in Chrome, using this implementation:
On my machine, this returns
I propose that we try to detect either function. If they exist, then we should use them directly and ignore the rest of the detection logic.
Eventually, when all of the browsers support this natively, jsTimeZoneDetect can be thought of as a shim for supporting older browsers.