Skip to content

Hermes Intl::DateTimeFormat default constructor fails with default locale and options #198

@anramanath

Description

@anramanath

Bug Description

Using the Intl.DateTimeFormat constructor with default (undefined) fails even though the parameter is optional
const formatter = new Intl.DateTimeFormat(undefined, options);

  • The issue is reproducible with the latest version of RNW 0.73.7.

Hermes git revision (if applicable):
React Native version: 0.73.7
OS: Windows 11
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):

Steps To Reproduce

  1. Create RNW application follow these directions
  2. Modify Hermes version to ensure Hermes Internationalization is enabled (0.1.27+)
  3. Try using formatter = new Intl.DateTimeFormat(undefined, options); to format any date and display the text
  4. Observe crash

code example:
const formatter = new Intl.DateTimeFormat(undefined, options);

The Expected Behavior

Formatted date, no crash.

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