facebook / facebook/hermes

Date("mm/dd/yyyy 00:00:00") fails with Hermes

Open
#647 28 comments 18 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Bug Description

When using dates like on the web, for example: 11/30/2000 00:00:00 I get "Invalid Date"

- [x] I have run `gradle clean` and confirmed this bug does not occur with JSC

Hermes version: 0.9.0
React Native version (if any): 0.66.1
OS version (if any):
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):

## Steps To Reproduce

1. Pass the format '11/30/2021 00:00:00" in the Javascript Date Builder
2. Show result on console

## More infos

I tried to rewrite the Date constructor but I get the following message: RangeError: "Date value out of bounds, js engine: hermes"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.