ナノ秒(nanosecond)をフォーマットするには1000を掛ければ問題ない。
var nanosecond = "1565980455";
console.log(moment(nanosecond*1000).format()); //2019-08-17T03:34:15+09:00
console.log(moment(nanosecond*1000).format('YYYY/MM/DD')); //2019/08/17
Go to list of users who liked
More than 5 years have passed since last update.
ナノ秒(nanosecond)をフォーマットするには1000を掛ければ問題ない。
var nanosecond = "1565980455";
console.log(moment(nanosecond*1000).format()); //2019-08-17T03:34:15+09:00
console.log(moment(nanosecond*1000).format('YYYY/MM/DD')); //2019/08/17
Register as a new user and use Qiita more conveniently
Go to list of users who liked