New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date format has invisible characters in IE11 #201
Comments
There is a detailed description and discussion of this issue at the ECMA 402 spec level: tc39/ecma402#28 I searched through all the CLDR locale data used by the We also can't blinding strip the LRMs and RLMs characters they are there for a reason — to provide bidi hits on structured text. If they are removed it will lead to incorrect and incomprehensible strings in the UI. var df = new Intl.DateTimeFormat('ar', {
day : 'numeric',
month: 'numeric',
year : 'numeric'
});
var withRLMs = df.format(Date.now());
var withoutRLMs = df.format(Date.now()).replace(/\u200F/g, '');
console.log(withRLMs); // "٣/١١/٢٠١٥"
console.log(withoutRLMs); // "٣/١١/٢٠١٥" In the above example, the expected output for Arabic is "year/month/day", if the RLMs are removed, it ends up being "year/day/month" which is incorrect and would confuse the user. The issue here is that IE adds some redundant, but valid, LRM chars, these are safe to strip in most cases, but not the Farsi one mentioned above. There's a larger issue here for dates and React checksum though: timezones. While the ECMA 402 spec and JavaScript implementations support timezones for date/time formatting, the Even if IE used the CLDR like Chrome and Firefox for its backing locale data, we still have the issue of Node 0.10 and timezones being different from server to client causing checksums to fail. Because of this, I'm thinking of solution that also updates the client after With relative times, I've implemented a similar solution to avoid checksum mismatches: #191 |
We have this as well. I would have expected a little more activity at least in this issue. Do people just not care about IE, or am I missing some obvious workaround? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. |
formatDate function from react-intl returns date with U+200E (left-to-right marker) characters in IE11. Since the same function returns date without these characters in server, this causes checksum mismatch. Please fix formatDate() to return date string without any invisible characters.
The text was updated successfully, but these errors were encountered: