function getCurrentDate(data) {
var date = new Date(data);
console.log(date);
var monthArray=new Array
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug",
"Sep","Oct","Nov","Dec");
var weekArray = new Array("Sun","Mon","Tue",
"Wed","Thu","Fri","Sat");
month=date.getMonth();
day=date.getDate();
if(day.toString().length == 1){
day="0"+day.toString();
}
var time = weekArray[date.getDay()]
+" "
+day
+" "
+monthArray[month]+". "
+date.getFullYear() ;
return time;
}
{message type="info(选择其一)"}另外苹果开发H5的时候时间格式务必要转换为2017/08/23格式,否则不能输出!!!切记{/message}
评论 (0)