With Hermes engine, certain date formats crash on production but works in debug
See original GitHub issueReact 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
- add date: const reproduce = new Date(‘Jul 18, 2018’);
- 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; }
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
React native app with Hermes crashes with "SIGSEGV
If Hermes was broken completely, I would definitely know it. This issue happens many times every day, but the vast majority (99.x%) of...
Read more >API - ESBuild
To join a set of files together with esbuild, import them all into a single entry point file and bundle just that one...
Read more >Get to know different JavaScript environments in React Native
This returns the correct Date object in debug mode, but yields Invalid Date in release. What's special about Date constructor?
Read more >Android meeting sdk crash on initialize - Zoom Developer Forum
App is suddenly crash when calling zoomSDK.initialize() method. I have added proguard rules as well but no luck. My build.gradle is below: ...
Read more >How to improve the performance of a React Native app
React Navigation is lightweight and can work for both small- and large-scale applications. Avoid Use of ScrollView to Render Huge Lists. There ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m seeing this also. A date in ISO format like
Fri, 06 Sep 2019 18:45:29 +0000 (UTC)parses as an Invalid Date in Hermes. It works on iOS and was working in Android in 0.59. I am now using Moment as a workaround but this should be supported natively.Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.