2020
10-10
10-10
微信小程序获取当前时间及星期几的实例代码
效果图如下所示实例代码如下:util.jsfunctionformatTime(date){varyear=date.getFullYear()varmonth=date.getMonth()+1varday=date.getDate()varhour=date.getHours()varminute=date.getMinutes()varsecond=date.getSeconds()return[year,month,day].map(formatNumber).join('/')+''+[hour,minute,second].map(formatNumber).join(':')}functionformatNumber(n){n=n.toString()retu...
继续阅读 >