js有关时间日期的操作

var myDate = new Date();
var date_string = myDate.getFullYear()+""+((myDate.getMonth()+1)<10?"0":"")+(myDate.getMonth()+1)+""+(myDate.getDate()<10?"0":"")+myDate.getDate();

原文地址:https://www.cnblogs.com/dytl/p/3934378.html