1const unixTime = 1210981217;
2const date = new Date(unixTime*1000);
3console.log(date.toLocaleDateString("en-US"));
4//expected: "5/16/2008"
1var s = new Date(1504095567183).toLocaleDateString("en-US")
2// expected output "8/30/2017"
3console.log(s);
1new Date('2012.08.10').getTime() / 1000 //secs
2new Date('2012.08.10').getTime() //milliseconds