Open jonassvalin opened 1 year ago
Thank you for reporting this. Unfortunately, this is a known problem in our implementation of formatToParts
on iOS. Hermes currently implements Intl on top of the APIs exposed by the platform, but these APIs are not sufficiently broad on iOS to create a correct implementation of formatToParts
.
We have disabled DateTimeFormat.prototype.formatToParts
on iOS for now, because of the known correctness problems. Instead, we are working on implementing a version of Intl on top of ICU which will allow us to provide a much broader and more correct Intl implementation at the expense of the added binary size cost of ICU.
@neildhar Thank you for the update. Is there any rough idea of when the new implementation will be prioritised?
FYI, we haven't forgotten this (and other issues). Here is an update on our latest plans: https://github.com/facebook/hermes/discussions/1211
Actively bumped into this issue today. Are there any updates regarding this bug?
Bug Description
Greetings 👋 We use Luxon in our react-native project for date management. When parsing dates and attempting to output the monthShort or weekdayShort components whilst using a real iOS device, we get null values back.
There is an open issue in Luxon stating that this is an implementation issue in Hermes as it works correctly for other JavaScript engines: https://github.com/moment/luxon/issues/1500
Hermes version: bundled with react-native React Native version: 0.72.5 Platform: iOS OS version: 16.6.1
Steps To Reproduce
Direct Hermes example:
https://github.com/moment/luxon/issues/1500#issuecomment-1709612387
Luxon example: