var UTCDateString = "Sat Jun 27 14:36:00 CST 2015";
var date = new Date( Date.parse(UTCDateString) );
alert(date.getFullYear() + "-" + (date.getMonth() +1) );
JS将UTC格式日期字串转换成日期DATE对象
最新推荐文章于 2024-10-10 11:33:21 发布
var UTCDateString = "Sat Jun 27 14:36:00 CST 2015";
var date = new Date( Date.parse(UTCDateString) );
alert(date.getFullYear() + "-" + (date.getMonth() +1) );