|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.webdav.internal.kernel.utils.DateTime
public class DateTime
A generic date and time object. It uses UTC as the timezone and US as the locale.
Field Summary | |
---|---|
protected static String |
ASCTIME_PATTERN
|
protected SimpleDateFormat |
dateFormat
|
protected long |
dateTime
|
protected static String |
ISO_8601_MILLIS_PATTERN
|
protected static String |
ISO_8601_PATTERN
|
protected static String |
ISO_8601_UTC_MILLIS_PATTERN
|
protected static String |
ISO_8601_UTC_PATTERN
|
protected static String |
RFC_1123_PATTERN
|
protected static String |
RFC_850_PATTERN
|
Constructor Summary | |
---|---|
DateTime()
|
|
DateTime(long date)
Starts this object from a java long format (milliseconds). |
Method Summary | |
---|---|
boolean |
after(DateTime other)
|
boolean |
before(DateTime other)
|
boolean |
equals(DateTime other)
|
long |
getDateTime()
Milliseconds since 1 January 1970 0:00 UTC. |
int |
getMilliseconds()
|
void |
setDateTime(Date date)
|
void |
setDateTime(long dateTime)
Sets the date and time from a java long format (milliseconds). |
void |
setDateTime(String date)
Do nothing if date format is not supported |
protected boolean |
setDateTime(String date,
String pattern)
Do nothing if date format is not supported. |
Date |
toDate()
|
String |
toISO8601()
|
String |
toRFC1123()
|
String |
toString()
Returns on a RFC 1123 format. |
protected String |
toString(String pattern)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected SimpleDateFormat dateFormat
protected long dateTime
protected static final String RFC_1123_PATTERN
protected static final String RFC_850_PATTERN
protected static final String ASCTIME_PATTERN
protected static final String ISO_8601_UTC_PATTERN
protected static final String ISO_8601_PATTERN
protected static final String ISO_8601_UTC_MILLIS_PATTERN
protected static final String ISO_8601_MILLIS_PATTERN
Constructor Detail |
---|
public DateTime()
public DateTime(long date)
Method Detail |
---|
public boolean after(DateTime other)
public boolean before(DateTime other)
public boolean equals(DateTime other)
public long getDateTime()
public int getMilliseconds()
public void setDateTime(long dateTime)
public void setDateTime(String date)
protected boolean setDateTime(String date, String pattern)
public void setDateTime(Date date)
public Date toDate()
public String toISO8601()
public String toRFC1123()
public String toString()
toString
in class Object
protected String toString(String pattern)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |