|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.xtvdclient.xtvd.datatypes.AbstractDataType
net.sf.xtvdclient.xtvd.datatypes.DateTime
public class DateTime
A class that represents a dateTime datatype.
Field Summary | |
---|---|
static int |
OFFSET
A constant that is used to store the time offset in
milliseconds from UTC . |
Fields inherited from class net.sf.xtvdclient.xtvd.datatypes.AbstractDataType |
---|
END_OF_LINE |
Constructor Summary | |
---|---|
DateTime()
Default constructor. |
|
DateTime(java.util.Date date)
Create a new instance of the class with the specified date value |
|
DateTime(java.lang.String dateTime)
Create a new instance of the class with the specified string representation of the dateTime data type. |
Method Summary | |
---|---|
java.util.Date |
getDate()
Returns date . |
java.util.Date |
getLocalDate()
Return a java.util.XtvdDate object that is converted
from the UTC date to the your timezone. |
int |
hashCode()
Returns a hash code value for this class. |
void |
setDate(java.util.Date date)
Set date . |
void |
setDate(java.lang.String dateTime)
Set date by parsing the dateTime string representation. |
java.lang.String |
toString()
Over-ridden implementation. |
Methods inherited from class net.sf.xtvdclient.xtvd.datatypes.AbstractDataType |
---|
compareTo, equals, replaceSpecialCharacters, replaceSpecialCharacters |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int OFFSET
offset
in
milliseconds from UTC
.
Constructor Detail |
---|
public DateTime()
public DateTime(java.lang.String dateTime) throws java.text.ParseException
String
- dateTime - The dateTime representation which is
to be parsed.
java.text.ParseException
- - If the dateTime representation is
invalid.public DateTime(java.util.Date date)
Date
- date - The date to use to initialise this class.Method Detail |
---|
public java.util.Date getLocalDate()
java.util.XtvdDate
object that is converted
from the UTC
date
to the your timezone.
public java.lang.String toString()
date
value.
toString
in class java.lang.Object
public int hashCode()
date
field.
hashCode
in class java.lang.Object
public final java.util.Date getDate()
date
.
public final void setDate(java.util.Date date)
date
.
Date
- date - The value to set.public final void setDate(java.lang.String dateTime) throws java.text.ParseException
date
by parsing the dateTime string representation.
Date
- date - The value to set.
java.text.ParseException
- - If the dateTime representation
specified is invalid.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |