You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the polyfill for the date time format and en-GB locale data, the date formatting seems to be incorrect. Rather than format "d/MMM/y" it results in a format "d MMM y". This is not consistent with the non polyfilled behavior.
To Reproduce
Steps to reproduce the behavior:
Minimal example:
require('@formatjs/intl-datetimeformat/polyfill');
require('@formatjs/intl-datetimeformat/locale-data/en-GB');
const formatter = new Intl.DateTimeFormat('en-GB');
const result = formatter.format(new Date());
console.log(result); // prints: "12 8 2020", expected value: "12/8/2020" or "12/08/2020"
Expected behavior
I expect the date to be of format "d/MMM/y": forward slash as a separator sign, rather than a space.
e.g in Chrome (no polyfill):
Which package?
intl-datetimeformat
Describe the bug
When using the polyfill for the date time format and en-GB locale data, the date formatting seems to be incorrect. Rather than format "d/MMM/y" it results in a format "d MMM y". This is not consistent with the non polyfilled behavior.
To Reproduce
Steps to reproduce the behavior:
Minimal example:
Expected behavior
I expect the date to be of format "d/MMM/y": forward slash as a separator sign, rather than a space.
e.g in Chrome (no polyfill):
Additional context
Failing test: https://travis-ci.org/github/Sensorfactdev/i18n/builds/716981838
The issue is resolved when manually updating the en-GB locale data file: update the first occurence of "d MMM y" to "d/MMM/y".
The text was updated successfully, but these errors were encountered: