com.sun.syndication.io.impl
public class DateParser extends Object
Field Summary | |
---|---|
static String[] | ADDITIONAL_MASKS |
static String[] | masks
The masks used to validate and parse the input to this Atom date.
|
static String[] | RFC822_MASKS |
static String[] | W3CDATETIME_MASKS |
Constructor Summary | |
---|---|
DateParser()
Private constructor to avoid DateParser instances creation. |
Method Summary | |
---|---|
static String | formatRFC822(Date date)
create a RFC822 representation of a date.
|
static String | formatW3CDateTime(Date date)
create a W3C Date Time representation of a date.
|
static Date | parseDate(String sDate)
Parses a Date out of a String with a date in W3C date-time format or
in a RFC822 format.
|
static Date | parseRFC822(String sDate)
Parses a Date out of a String with a date in RFC822 format.
|
static Date | parseUsingMask(String[] masks, String sDate)
Parses a Date out of a string using an array of masks.
|
static Date | parseW3CDateTime(String sDate)
Parses a Date out of a String with a date in W3C date-time format.
|
Parameters: date Date to parse
Returns: the RFC822 represented by the given Date It returns null if it was not possible to parse the date.
Parameters: date Date to parse
Returns: the W3C Date Time represented by the given Date It returns null if it was not possible to parse the date.
Parameters: sDate string to parse for a date.
Returns: the Date represented by the given W3C date-time string. It returns null if it was not possible to parse the given string into a Date.
Parameters: sDate string to parse for a date.
Returns: the Date represented by the given RFC822 string. It returns null if it was not possible to parse the given string into a Date.
Parameters: masks array of masks to use for parsing the string sDate string to parse for a date.
Returns: the Date represented by the given string using one of the given masks. It returns null if it was not possible to parse the the string with any of the masks.
Parameters: sDate string to parse for a date.
Returns: the Date represented by the given W3C date-time string. It returns null if it was not possible to parse the given string into a Date.