| | |
| | | } |
| | | |
| | | /** |
| | | * 获取当前时间 |
| | | * @return |
| | | */ |
| | | public static String getCurrentDate() { |
| | | |
| | | SimpleDateFormat f = new SimpleDateFormat("yyyy/MM/dd",Locale.CHINA); |
| | | |
| | | return f.format(new Date(System.currentTimeMillis())); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取时间的年份 |
| | | * @return |
| | | */ |
| | |
| | | return 0; |
| | | } |
| | | |
| | | public static long parseDateMillisecond(String time) { |
| | | |
| | | SimpleDateFormat formart = new SimpleDateFormat("yyyy/MM/dd",Locale.CHINA); |
| | | |
| | | try { |
| | | Date d = formart.parse(time); |
| | | |
| | | return d.getTime(); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | public static Date parseTaskTime(String time) { |
| | | |
| | | SimpleDateFormat formart = new SimpleDateFormat("yyyy/MM/dd HH:mm",Locale.CHINA); |