-
Notifications
You must be signed in to change notification settings - Fork 684
Intl.DateTimeFormat().resolvedOptions().calendar
is undefined
#1716
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
Comments
Hi, unfortunately we are unable to investigate problems in external polyfills, etc, and in older versions of RN. In order to help, we need a minimal reproduction using the latest Hermes CLI. |
Hi, I don't think the polyfill is the problem. I only mentioned it for context for how that As for the React Native version, you can configure the Expo Snack I provided to use Expo 53 which I believe should be using RN 0.79. I don't currently have access to an iOS device to test with nor know how to use the Hermes CLI to run on iOS, but if all you need is a code example, then executing this on an iOS device/simulator should be sufficient: console.log(Intl.DateTimeFormat().resolvedOptions().calendar); I expect this to log some calendar value (such as |
Thanks, I confirmed that |
Great! Sorry for the confusion. Let me know if you need me to update my original post to help clarify anything for future reference. |
Bug Description
Intl.DateTimeFormat().resolvedOptions().calendar
is not defined on iOS.I suspect this is a new change as of about a week ago and is possibly related to an iOS update?
My Expo app (SDK 52.0.44) suddenly started crashing on start up about a week ago because this property wasn't defined. In my case, the crash was related to the Temporal polyfill which is expecting the
calendar
property to exist. I had recently updated from version 0.44 to 0.51 of the polyfill, however there was no issue for about a month after the update until about a week ago when the polyfill started throwing an error due tocalendar
not being defined. The code in the polyfill also doesn't suggest that it's using this value any differently between the versions.React Native version: 0.76.9
OS: iOS
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): tested on an iPhone 16 Pro Max, whatever that uses
Steps To Reproduce
Here is an Expo Snack that reproduces the issue:
https://snack.expo.dev/@miramar-zeff/ios-missing-intl-datetimeformat-calendar-bug?platform=ios
Launch the iOS instance and note how the "Calendar:" is blank. It shows "Calendar: gregory" (with my locale, at least) in Android and Web.
The Expected Behavior
Based on the MDN article, I believe this value should always be defined, though I guess I'm not certain. It appears in web and Android builds, at least.
The text was updated successfully, but these errors were encountered: