建立時間戳
var timestamp = new Date().getTime();
時間戳的轉換
time 時間戳
function changeDate(time) {
let date = new Date(parseInt(time));
Y = date.getFullYear() + '-';
M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
// 判斷如果天數小於10,前面會加0
Linda Liu changed a year agoView mode Like Bookmark