Skip to content

Intl.DateTimeFormat().resolvedOptions().calendar is undefined #1716

@AlteredConstants

Description

@AlteredConstants

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 to calendar 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions