You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function timeFormat (date) {
if (!date || typeof (date) === 'string') {
throw Error('参数异常,请检查...')
}
var y = date.getFullYear() //年
var m = date.getMonth() + 1 //月
var d = date.getDate() //日
return y + '-' + m + '-' + d
}
function getMonthFirstDay () {
var date = new Date()
date.setDate(1)
return timeFormat(date)
}
function getMonthLastDay () {
var curDate = new Date()
var curMonth = curDate.getMonth()
curDate.setMonth(curMonth + 1)
curDate.setDate(0)
return timeFormat(curDate)
}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: