1.獲取當前月份的第一天 function getCurrentMonthFirst(){var date = new Date(); date.setDate(1); var month = parseInt(date.getMonth()+1); var day ...
引入XDate.JS 這個小插件,不知道的百度谷歌吧 代碼如下: var firstDate new Date firstDate.setDate 第一天 var endDate new Date firstDate endDate.setMonth firstDate.getMonth endDate.setDate alert 第一天: new XDate firstDate .toStrin ...
2012-06-01 15:33 0 14426 推薦指數:
1.獲取當前月份的第一天 function getCurrentMonthFirst(){var date = new Date(); date.setDate(1); var month = parseInt(date.getMonth()+1); var day ...
java獲取當前月第一天和最后一天,上個月第一天和最后一天 SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); //獲取前月的第一天 Calendar ...
SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd" ); //獲取前月的第一天 Calendar cal_1 ...
獲取當前月第一天: /** * 獲取當前月第一天 * @param month * @return */ public static String getFirstDayOfMonth(int month ...
獲取當前月第一天: 獲取當前月最后一天: ...
...
mysql 函數: select curdate(); -- 獲取當前日期select DATE_ADD(curdate(),interval -day(curdate())+1 day) -- 獲取本月第一天select last_day ...