var t = "2010-06-09 13:12:01".split(/[- :]/); var d = new Date(t[0], t[1] - 1, t[2], t[3], t[4],t[5]); alert(d);
var date = new Date(‘2015-10-15T16:10:30Z‘); var str1 = date.getUTCFullYear() + ‘年‘ + (date.getMonth() * 1 + 1) + ‘月‘ + date.getUTCDate() + ‘日‘ + date.getUTCHours() + ‘时‘ + date.getUTCMinutes() + ‘分‘ + date.getUTCSeconds() + ‘秒‘; alert(str1);
时间: 2024-11-11 00:05:14