/** * Parses the date value using the given date formats. * * @param dateValue the date value to parse * @param dateFormats the date formats to use * @return the parsed date or null if input could not be parsed */ public static Date parseDate(final String dateValue, final String[] dateFormats) { return parseDate(dateValue, dateFormats, null); }
/** * Parses a date value. * * <p> * The formats used for parsing the date value are retrieved from the default http params. * * @param dateValue the date value to parse * @return the parsed date or null if input could not be parsed */ public static Date parseDate(final String dateValue) { return parseDate(dateValue, null, null); }
/** * Parses a date value. * * <p> * The formats used for parsing the date value are retrieved from the default http params. * * @param dateValue the date value to parse * @return the parsed date or null if input could not be parsed */ public static Date parseDate(final String dateValue) { return parseDate(dateValue, null, null); }
/** * Parses a date value. * * <p> * The formats used for parsing the date value are retrieved from the default http params. * * @param dateValue the date value to parse * @return the parsed date or null if input could not be parsed */ public static Date parseDate(final String dateValue) { return parseDate(dateValue, null, null); }
/** * Parses the date value using the given date formats. * * @param dateValue the date value to parse * @param dateFormats the date formats to use * @return the parsed date or null if input could not be parsed */ public static Date parseDate(final String dateValue, final String[] dateFormats) { return parseDate(dateValue, dateFormats, null); }
/** * Parses the date value using the given date formats. * * @param dateValue the date value to parse * @param dateFormats the date formats to use * @return the parsed date or null if input could not be parsed */ public static Date parseDate(final String dateValue, final String[] dateFormats) { return parseDate(dateValue, dateFormats, null); }
/** * Constructor. * * @param raw The raw header value. */ protected HeaderDate(String raw) { this.raw = raw; this.date = DateUtils.parseDate(raw); }
/** * Constructor. * * @param raw The raw header value. */ protected HeaderDate(String raw) { this.raw = raw; this.date = DateUtils.parseDate(raw); }
/** * Constructor. * * @param raw The raw header value. */ protected HeaderDate(String raw) { this.raw = raw; this.date = DateUtils.parseDate(raw); }
/** * Returns this header value as a {@link java.util.Date} object. * * @return This header value as a {@link java.util.Date} object, or <jk>null</jk> if the value is not a date. */ public java.util.Date asDate() { char c0 = charAt(value, 0); if (c0 >= '0' && c0 <= '9') return null; return DateUtils.parseDate(toString()); }
/** * Returns this header value as a {@link java.util.Date} object. * * @return This header value as a {@link java.util.Date} object, or <jk>null</jk> if the value is not a date. */ public java.util.Date asDate() { char c0 = charAt(value, 0); if (c0 >= '0' && c0 <= '9') return null; return DateUtils.parseDate(toString()); }
/** * Returns this header value as a {@link java.util.Date} object. * * @return This header value as a {@link java.util.Date} object, or <jk>null</jk> if the value is not a date. */ public java.util.Date asDate() { char c0 = charAt(value, 0); if (c0 >= '0' && c0 <= '9') return null; return DateUtils.parseDate(toString()); }
/** * Returns this header value as a {@link java.util.Date} object. * * @return This header value as a {@link java.util.Date} object, or <jk>null</jk> if the value is not a date. */ public java.util.Date asDate() { char c0 = charAt(value, 0), c1 = charAt(value, 1); if (c0 == '*' || c0 == '"' || (c0 == 'W' && c1 == '/')) return null; return DateUtils.parseDate(toString()); }
/** * Returns this header value as a {@link java.util.Date} object. * * @return This header value as a {@link java.util.Date} object, or <jk>null</jk> if the value is not a date. */ public java.util.Date asDate() { char c0 = charAt(value, 0), c1 = charAt(value, 1); if (c0 == '*' || c0 == '"' || (c0 == 'W' && c1 == '/')) return null; return DateUtils.parseDate(toString()); }
/** * Returns this header value as a {@link java.util.Date} object. * * @return This header value as a {@link java.util.Date} object, or <jk>null</jk> if the value is not a date. */ public java.util.Date asDate() { char c0 = charAt(value, 0), c1 = charAt(value, 1); if (c0 == '*' || c0 == '"' || (c0 == 'W' && c1 == '/')) return null; return DateUtils.parseDate(toString()); }