Posted in Javascript onNovember 19, 2013
以下就是JS代码::
@ author YHC:
function getCurrentMonthLastDay(){ var current=new Date(); var currentMonth=current.getMonth(); var nextMonth=++currentMonth; var nextMonthDayOne =new Date(current.getFullYear(),nextMonth,1); var minusDate=1000*60*60*24; return new Date(nextMonthDayOne.getTime()-minusDate); } function getCurrentMonthLastDay(){ var current=new Date(); var currentMonth=current.getMonth(); var nextMonth=++currentMonth; var nextMonthDayOne =new Date(current.getFullYear(),nextMonth,1); var minusDate=1000*60*60*24; return new Date(nextMonthDayOne.getTime()-minusDate); }
function getCurrentMonthFirstDay(){ var current=new Date(); current.setDate(1); return current; } function getCurrentMonthFirstDay(){ var current=new Date(); current.setDate(1); return current; }
js获取当月最后一天实例代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@