| | |
| | | } |
| | | } |
| | | |
| | | public static boolean isTimeBeforE(Date nows, Date date) { |
| | | long hous = nows.getTime() - date.getTime(); |
| | | if (hous >= 0) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | /** |
| | | * 将小时数换算成返回以毫秒为单位的时间 |
| | | * |
| | |
| | | return getDate(dateToDateString(cal.getTime(), yyyy_MM_dd_EN)); |
| | | } |
| | | |
| | | public static Date getLastDayOfCurrMonth(Date time) { |
| | | Calendar cal = Calendar.getInstance(); |
| | | cal.setTime(time); |
| | | cal.add(Calendar.MONTH, 1); |
| | | cal.set(Calendar.DAY_OF_MONTH, 0); |
| | | return getDate(dateToDateString(cal.getTime(), yyyy_MM_dd_EN)); |
| | | } |
| | | |
| | | /** |
| | | * 根据日期追加的天数,得到一个新日期 |
| | | * |