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
{{ message }}
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
SUMMARY:
intl.formatDate, with the style attribute {month: "short"} or {month= "narrow"} not working on IE11 (Win10), but {month:"long"} works as expected (Code is attached at the end).
- On IE11 (Win10), the date format is not as expected (same format for both short & narrow).
- But {month: "long"} is accepted by IE, and showing the same results as the other browsers.
- On other browsers, actual format is the same as expected.
QUESTION:
Is this an IE problem or the intl problem?
Expected date format
Sep 09, 2019
(mmm dd, yyyy)
Actual date format
09-Sep-2019
(dd-mmm-yyyy)
Attempted Solutions
Tried to add an addition attribute in the style :
- ({format: "mmm dd yyyy"}) ;
- ({format: "mmm dd, yyyy"}) ;
- ({format: "%m%d/%Y"}) ;
Installed polyfill;
Used Intl.DateTimeFormat instead of Intl.formatDate;
Used the {month: "long"} style attribute, and sliced the first three letters (this solution worked).
Installed i18n, and used I18n.strftime(dummydate,"%m%d/%Y");
ISSUE
SUMMARY:
intl.formatDate, with the style attribute {month: "short"} or {month= "narrow"} not working on IE11 (Win10), but {month:"long"} works as expected (Code is attached at the end).
QUESTION:
Is this an IE problem or the intl problem?
Expected date format
Sep 09, 2019
(mmm dd, yyyy)
Actual date format
09-Sep-2019
(dd-mmm-yyyy)
Attempted Solutions
- ({format: "mmm dd yyyy"}) ;
- ({format: "mmm dd, yyyy"}) ;
- ({format: "%m%d/%Y"}) ;
I18n.strftime(dummydate,"%m%d/%Y");
Code
const dummydate = intl.formatDate(epoch, { ...style, year: "numeric", month: "short", day: "2-digit", timeZone: "UTC", }); return dummydate;
The text was updated successfully, but these errors were encountered: