| | |
| | | * @return String |
| | | * @throws Exception |
| | | */ |
| | | public static String getNowPlusTime() throws Exception { |
| | | public static String getNowPlusTime() { |
| | | String nowDate = ""; |
| | | try { |
| | | java.sql.Date date = null; |
| | |
| | | calendar.add(Calendar.DATE, days);// |
| | | return calendar.getTime(); |
| | | } |
| | | public static Date addMonthToDate(Date date, int month) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.add(Calendar.MONTH, month);// |
| | | return calendar.getTime(); |
| | | } |
| | | public static Date addYearToDate(Date date, int year) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.add(Calendar.YEAR, year);// |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | public static String afterDateToStr(Integer days){ |
| | | Date date = new Date(); |