| | |
| | | public static String YYYY = "yyyy"; |
| | | |
| | | public static String YYYY_MM = "yyyy-MM"; |
| | | public static String YYYYMMDD="yyyyMMdd"; |
| | | |
| | | public static String YYYY_MM_DD = "yyyy-MM-dd"; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 日期型字符串转化为日期 |
| | | * @param date |
| | | * @param format |
| | | * @return |
| | | */ |
| | | public static final String formatDate(Date date, String format){ |
| | | return new SimpleDateFormat(format).format(date); |
| | | } |
| | | public static final String formatDate(Date date){ |
| | | return new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS).format(date); |
| | | } |
| | | /** |
| | | * 日期型字符串转化为日期 格式 |
| | | */ |
| | | public static Date parseDate(Object str) |