I have been looking everywhere to a solution to this problem which I’ve been on for hours now. I am trying to get a date in my React Native expo app. However keep getting error
ERROR TypeError: constructor is not callable
Below is my simple implementation
const today = new Date();
console.log("date", today);
And also my package.json
{
"name": "scoreboard-v2",
"version": "1.0.0",
"main": "expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"@expo/metro-runtime": "~3.2.1",
"expo": "~51.0.11",
"expo-status-bar": "~1.12.1",
"firebase-admin": "^12.1.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.2",
"react-native-date-picker": "^5.0.4",
"react-native-web": "~0.19.10",
"styled-components": "^6.1.11"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}
Is there something wrong with the Date function? Or does expo not support this?
But im sure this is a JS specific function which should have nothing to do with expo or RN
Thanks