date-time-format-timezone icon indicating copy to clipboard operation
date-time-format-timezone copied to clipboard

Surgically polyfills timezone support in Intl.DateTimeFormat API

Results 11 date-time-format-timezone issues
Sort by recently updated
recently updated
newest added

Are there any plans to release this code in the form of a [module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)? This would make the code much easier to consume in projects like Deno: https://github.com/denoland/deno/issues/1636

new Intl.DateTimeFormat('en', { timeZone: 'Etc/UTC', timeZoneName:'long', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', }).format(new Date()) throws error "Error: unsupported value "long" for timeZone Etc/UTC. requires locale data...

Australia/Sydney is in the supported timezone list but hitting this https://unpkg.com/[email protected]/build/browserified/data/timezones/tzdata-australia-sydney.js returns not found

The licence for this project isn't a proper SPDX expression. It is currently BSD 3-clause but should be BSD-3-Clause The complete list of SPDX licence expressions is found at https://spdx.org/licenses/...

if I use **toLocaleDateString** on polyfilled method with weekday option I get an incorrect date format new Date().toLocaleDateString([], { timeZone: undefined, weekday: 'long' }) **"‎Thursday‎, ‎1‎ ‎23‎, ‎2020"** new Intl.DateTimeFormat([],...

**America/Punta_Arenas** timezone is not supported, causes crash in IE11

I am trying to do the following: ``` const date = new Date() new Intl.DateTimeFormat("en", { timeZone: "en", weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric',...

https://github.com/formatjs/date-time-format-timezone/blob/1501228ef88367f79dd4ed8a788ce802f705b7d6/src/code/lookup-utill.js#L64 This line fails because the IE11 Date constructor doesn't like the "from" or "to" formats found in the timezone data. We only see a problem when there is more...

I can't clone this repo and run `grunt download` as it looks like `zdump -v` generates timezone lines that the parser is unable to parse. e.g. ``` Africa/Abidjan -9223372036854775808 =...

It would be a nice addition to the README to document which major browsers are known to lack the support that this polyfill adds