| java.lang.Object org.restlet.util.DateUtils
DateUtils | final public class DateUtils (Code) | | Date manipulation utilities.
author: Jerome Louvel (contact@noelios.com) author: Piyush Purang (ppurang@gmail.com) |
Method Summary | |
public static boolean | after(Date baseDate, Date afterDate) Compares two date with a precision of one second.
Parameters: baseDate - The base date Parameters: afterDate - The date supposed to be after. | public static boolean | before(Date baseDate, Date beforeDate) Compares two date with a precision of one second.
Parameters: baseDate - The base date Parameters: beforeDate - The date supposed to be before. | public static boolean | equals(Date baseDate, Date otherDate) Compares two date with a precision of one second.
Parameters: baseDate - The base date Parameters: otherDate - The other date supposed to be equals. | public static String | format(Date date, String format) Formats a Date according to the first format in the array.
Parameters: date - The date to format. Parameters: format - The date format to use. | public static Date | parse(String date, List<String> formats) Parses a formatted date into a Date object.
Parameters: date - The date to parse. Parameters: formats - The date formats to use sorted by completeness. | public static Date | unmodifiable(Date date) Returns an immutable version of a given date.
Parameters: date - The modifiable date. |
FORMAT_ASC_TIME | final public static List<String> FORMAT_ASC_TIME(Code) | | Obsoleted HTTP date format (ANSI C asctime() format).
|
FORMAT_RFC_1036 | final public static List<String> FORMAT_RFC_1036(Code) | | Obsoleted HTTP date format (RFC 1036).
|
FORMAT_RFC_1123 | final public static List<String> FORMAT_RFC_1123(Code) | | Preferred HTTP date format (RFC 1123).
|
FORMAT_RFC_3339 | final public static List<String> FORMAT_RFC_3339(Code) | | W3C date format (RFC 3339).
|
FORMAT_RFC_822 | final public static List<String> FORMAT_RFC_822(Code) | | Common date format (RFC 822).
|
after | public static boolean after(Date baseDate, Date afterDate)(Code) | | Compares two date with a precision of one second.
Parameters: baseDate - The base date Parameters: afterDate - The date supposed to be after. True if the afterDate is indeed after the baseDate. |
before | public static boolean before(Date baseDate, Date beforeDate)(Code) | | Compares two date with a precision of one second.
Parameters: baseDate - The base date Parameters: beforeDate - The date supposed to be before. True if the beforeDate is indeed before the baseDate. |
equals | public static boolean equals(Date baseDate, Date otherDate)(Code) | | Compares two date with a precision of one second.
Parameters: baseDate - The base date Parameters: otherDate - The other date supposed to be equals. True if both dates are equals. |
format | public static String format(Date date, String format)(Code) | | Formats a Date according to the first format in the array.
Parameters: date - The date to format. Parameters: format - The date format to use. The formatted date. |
parse | public static Date parse(String date, List<String> formats)(Code) | | Parses a formatted date into a Date object.
Parameters: date - The date to parse. Parameters: formats - The date formats to use sorted by completeness. The parsed date. |
unmodifiable | public static Date unmodifiable(Date date)(Code) | | Returns an immutable version of a given date.
Parameters: date - The modifiable date. An immutable version of a given date. |
|
|