Skip to content

With Hermes engine, certain date formats crash on production but works in debug #26187

Closed
@roydipti23

Description

@roydipti23

React Native version: RN60

new Date('Jul 18, 2018') is not supported on RN
new Date('18-07-2018 12:00') is not supported on RN

Steps To Reproduce

  1. add date: const reproduce = new Date('Jul 18, 2018');
  2. It will crash in production

Describe what you expected to happen:
It should return the expected date.

Snack, code example, screenshot, or link to a repository:

export function getDateFormat(date = 'Jul 18, 2018' ) {
const newDate = new Date(date);
return newDate;
}

export function getDateFormat(date = '18-07-2018 12:00' ) {
const newDate = new Date(date);
return newDate;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugStaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions