Closed
Description
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
- 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;
}