/** * Formats the specified date as an ISO 8601 string. * * @param date the date to format * @return the ISO-8601 string representing the specified date */ public static String formatISO8601Date(DateTime date) { try { return iso8601DateFormat.print(date); } catch (RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an RFC 822 string. * * @param date * The date to format. * * @return The RFC 822 string representing the specified date. */ public static String formatRFC822Date(Date date) { try { return rfc822DateFormat.print(date.getTime()); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an ISO 8601 string. * * @param date * The date to format. * * @return The ISO 8601 string representing the specified date. */ public static String formatISO8601Date(Date date) { try { return iso8601DateFormat.print(date.getTime()); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as a compressedIso8601DateFormat ("yyyyMMdd'T'HHmmss'Z'") and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseCompressedISO8601Date(String dateString) { try { return new Date(compressedIso8601DateFormat.parseMillis(dateString)); } catch (RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as an ISO 8601 date and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as an RFC 822 date and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseRFC822Date(String dateString) { if (dateString == null) { return null; } try { return new Date(rfc822DateFormat.parseMillis(dateString)); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an ISO 8601 string. * * @param date the date to format * @return the ISO-8601 string representing the specified date */ public static String formatISO8601Date(DateTime date) { try { return iso8601DateFormat.print(date); } catch (RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an ISO 8601 string. * * @param date * The date to format. * * @return The ISO 8601 string representing the specified date. */ public static String formatISO8601Date(Date date) { try { return iso8601DateFormat.print(date.getTime()); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an RFC 822 string. * * @param date * The date to format. * * @return The RFC 822 string representing the specified date. */ public static String formatRFC822Date(Date date) { try { return rfc822DateFormat.print(date.getTime()); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as a compressedIso8601DateFormat ("yyyyMMdd'T'HHmmss'Z'") and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseCompressedISO8601Date(String dateString) { try { return new Date(compressedIso8601DateFormat.parseMillis(dateString)); } catch (RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as an ISO 8601 date and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as an RFC 822 date and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseRFC822Date(String dateString) { if (dateString == null) { return null; } try { return new Date(rfc822DateFormat.parseMillis(dateString)); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an ISO 8601 string. * * @param date the date to format * @return the ISO-8601 string representing the specified date */ public static String formatISO8601Date(DateTime date) { try { return iso8601DateFormat.print(date); } catch (RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an ISO 8601 string. * * @param date * The date to format. * * @return The ISO 8601 string representing the specified date. */ public static String formatISO8601Date(Date date) { try { return iso8601DateFormat.print(date.getTime()); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Formats the specified date as an RFC 822 string. * * @param date * The date to format. * * @return The RFC 822 string representing the specified date. */ public static String formatRFC822Date(Date date) { try { return rfc822DateFormat.print(date.getTime()); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as a compressedIso8601DateFormat ("yyyyMMdd'T'HHmmss'Z'") and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseCompressedISO8601Date(String dateString) { try { return new Date(compressedIso8601DateFormat.parseMillis(dateString)); } catch (RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as an ISO 8601 date and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseISO8601Date(String dateString) { try { return doParseISO8601Date(dateString); } catch(RuntimeException ex) { throw handleException(ex); } }
/** * Parses the specified date string as an RFC 822 date and returns the Date * object. * * @param dateString * The date string to parse. * * @return The parsed Date object. */ public static Date parseRFC822Date(String dateString) { if (dateString == null) { return null; } try { return new Date(rfc822DateFormat.parseMillis(dateString)); } catch(RuntimeException ex) { throw handleException(ex); } }