I am utilizing this particular function
export const getDate = (stamp: string) => {
console.log(stamp) //1581638400000
let date : any = Date.parse(stamp)
console.log(date) //NaN
let month = date.getMonth()
let day = date.getDay()
let year = date.getYear()
let formattedTime = month + '/' + day + '/' + year
return formattedTime
}
However, it appears to be functioning properly on this website
https://i.sstatic.net/6PC4R.png
What's the issue here? Why am I unable to use that timestamp?