| | |
| | | } |
| | | } |
| | | |
| | | public static Date getDateFromStringB(String date){ |
| | | SimpleDateFormat sDateFormat = getDateFormat(DateUtil.DATE_FORMATE_STRING_B); |
| | | try{ |
| | | synchronized (sDateFormat) { |
| | | return sDateFormat.parse(date); |
| | | } |
| | | }catch (Exception e){ |
| | | throw new IllegalArgumentException(e); |
| | | } |
| | | } |
| | | |
| | | public static Date getDateFromStringA(String date){ |
| | | SimpleDateFormat sDateFormat = getDateFormat(DateUtil.DATE_FORMATE_STRING_A); |
| | | try{ |
| | | synchronized (sDateFormat) { |
| | | return sDateFormat.parse(date); |
| | | } |
| | | }catch (Exception e){ |
| | | throw new IllegalArgumentException(e); |
| | | } |
| | | } |
| | | |
| | | public static Date getDefaultDateFromString(String date) |
| | | throws ParseException { |
| | | return getDateFromString(date, "yyyyMMddHHmmss"); |