new Date()とnew Date(time)の比較です
javascript
1console.log(new Date());//Sat Aug 25 2018 04:34:24 GMT+0900 (日本標準時) 2console.log(Math.floor(new Date().getTime() / (1000 * 60 * 60 * 24)));//17767 3 4var time = 1535112291408; 5console.log(new Date(time));//Fri Aug 24 2018 21:04:51 GMT+0900 (日本標準時) 6console.log(Math.floor(new Date(time).getTime() / (1000 * 60 * 60 * 24)));//17767
どういう結果が表示されるんでしょうか
回答2件
あなたの回答
tips
プレビュー