|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.james.util.RFC822Date
A utility class to allow creation of RFC822 date strings from Dates
and dates from RFC822 strings
It provides for conversion between timezones,
And easy manipulation of RFC822 dates
example - current timestamp: String nowdate = new RFC822Date().toString()
example - convert into java.util.Date: Date usedate = new RFC822Date("3 Oct 2001 08:32:44 -0000").getDate()
example - convert to timezone: String yourdate = new RFC822Date("3 Oct 2001 08:32:44 -0000", "GMT+02:00").toString()
example - convert to local timezone: String mydate = new RFC822Date("3 Oct 2001 08:32:44 -0000").toString()
Constructor Summary | |
RFC822Date()
Deprecated. creates a current timestamp using this machines system timezone |
|
RFC822Date(Date da)
Deprecated. creates object using date supplied and this machines system timezone |
|
RFC822Date(Date da,
String useTZ)
Deprecated. creates object using date supplied and the timezone string supplied useTZ can be either an abbreviation such as "PST", a full name such as "America/Los_Angeles", or a custom ID such as "GMT-8:00". |
|
RFC822Date(String rfcdate)
Deprecated. creates object from RFC822 date string supplied and the system default time zone In practice it converts RFC822 date string to the local timezone |
|
RFC822Date(String rfcdate,
String useTZ)
Deprecated. creates object from RFC822 date string supplied using the supplied time zone string |
Method Summary | |
Date |
getDate()
Deprecated. returns the java.util.Date object this RFC822Date represents. |
void |
setDate(Date da)
Deprecated. |
void |
setDate(String rfcdate)
Deprecated. The following styles of rfc date strings can be parsed Wed, 3 Oct 2001 06:42:27 GMT+02:10 Wed 3 Oct 2001 06:42:27 PST 3 October 2001 06:42:27 +0100 the military style timezones, ZM, ZA, etc cannot (yet) |
void |
setTimeZone(String useTZ)
Deprecated. |
void |
setTimeZone(TimeZone useTZ)
Deprecated. |
String |
toString()
Deprecated. returns the date as a string formated for RFC822 compliance ,accounting for timezone and daylight saving. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RFC822Date()
public RFC822Date(Date da)
da
- java.util.Date, A date objectpublic RFC822Date(Date da, String useTZ)
da
- java.util.Date, a date objectuseTZ
- java.lang.Sting, a timezone string such as "America/Los_Angeles" or "GMT+02:00"public RFC822Date(String rfcdate)
rfcdate
- java.lang.String - date in RFC822 format "3 Oct 2001 08:32:44 -0000"public RFC822Date(String rfcdate, String useTZ)
rfcdate
- java.lang.String - date in RFC822 formatuseTZ
- java.lang.String - timezone string *doesn't support Z style or UT*Method Detail |
public void setDate(Date da)
public void setDate(String rfcdate)
rfcdate
- java.lang.String - date in RFC822 formatpublic void setTimeZone(TimeZone useTZ)
public void setTimeZone(String useTZ)
public Date getDate()
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |