The following is the JS Code ::
@ Author YHC:
Copy codeThe Code is as follows:
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 );
}
Copy codeThe Code is as follows:
Function getCurrentMonthFirstDay (){
Var current = new Date ();
Current. setDate (1 );
Return current;
}
Function getCurrentMonthFirstDay (){
Var current = new Date ();
Current. setDate (1 );
Return current;
}