public class DateParser extends Object
Modifier and Type | Method and Description |
---|---|
static String |
formatRFC822(Date date,
Locale locale)
create a RFC822 representation of a date.
|
static String |
formatW3CDateTime(Date date,
Locale locale)
create a W3C Date Time representation of a date.
|
static Date |
parseDate(String sDate,
Locale locale)
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,
Locale locale)
Parses a Date out of a String with a date in RFC822 format.
|
static Date |
parseW3CDateTime(String sDate,
Locale locale)
Parses a Date out of a String with a date in W3C date-time format.
|
public static Date parseRFC822(String sDate, Locale locale)
sDate
- string to parse for a date.public static Date parseW3CDateTime(String sDate, Locale locale)
sDate
- string to parse for a date.public static Date parseDate(String sDate, Locale locale)
sDate
- string to parse for a date.public static String formatRFC822(Date date, Locale locale)
date
- Date to parsepublic static String formatW3CDateTime(Date date, Locale locale)
date
- Date to parseCopyright © 2020. All rights reserved.