微信小程序获取当前年月日

var timestamp = Date.parse(new Date()); var date = new Date(timestamp); //获取年 var Y = date.getFullYear(); //获取月 var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) :
相关文章
相关标签/搜索