/** * Convert a date to a String ("YYYYMMDD") * * @param d the date to convert * @return the formatted date */ public static String convert(Date d) { return getFormatter().format(d); }
/** * Convert a date to a String ("YYYYMMDD") * * @param d the date to convert * @return the formatted date */ public static String convert(Date d) { return getFormatter().format(d); }
/** * Convert a date to a String ("YYYYMMDD") * * @param d the date to convert * @return the formatted date */ public static String convert(Date d) { return getFormatter().format(d); }
/** * Convert between a String and a date * * @param value the String to convert * @return the parsed Date * @throws FieldConvertError raised for an invalid date string. */ public static Date convert(String value) throws FieldConvertError { Date d = null; checkString(value); try { d = getFormatter().parse(value); } catch (ParseException e) { throwFieldConvertError(value, TYPE); } return d; }
/** * Convert between a String and a date * * @param value the String to convert * @return the parsed Date * @throws FieldConvertError raised for an invalid date string. */ public static Date convert(String value) throws FieldConvertError { Date d = null; checkString(value); try { d = getFormatter().parse(value); } catch (ParseException e) { throwFieldConvertError(value, TYPE); } return d; }
/** * Convert between a String and a date * * @param value the String to convert * @return the parsed Date * @throws FieldConvertError raised for an invalid date string. */ public static Date convert(String value) throws FieldConvertError { Date d = null; String type = "date"; assertLength(value, 8, type); assertDigitSequence(value, 0, 8, type); try { d = getFormatter().parse(value); } catch (ParseException e) { throwFieldConvertError(value, type); } return d; }