当前时间戳

当前时间戳_第1张图片
图片发自App

var myDate = new Date();

var year = myDate.getFullYear();

var month = myDate.getMonth()+1;

var date = myDate.getDate();

var hour = myDate.getHours();

var minute = myDate.getMinutes();

var second = myDate.getSeconds();

当前时间戳_第2张图片
图片发自App

{year}年{month}月{date}日  {hour}:{minute}:{second}

你可能感兴趣的:(当前时间戳)