Package com.complexible.common.base
Class DateTime
- java.lang.Object
-
- com.complexible.common.base.DateTime
-
public final class DateTime extends java.lang.Object
Immutable representation of date time.- Author:
- Evren Sirin
-
-
Constructor Summary
Constructors Constructor Description DateTime(long time)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
long
getTime()
int
hashCode()
static DateTime
now()
java.util.GregorianCalendar
toCalendar()
java.sql.Date
toDate()
java.lang.String
toString()
String representation of date time in XML schema format.static DateTime
valueOf(java.lang.String str)
Creates a DateTime instance from XML schema serialization of xsd:dateTime.
-
-
-
Method Detail
-
now
public static DateTime now()
-
getTime
public long getTime()
-
toDate
public java.sql.Date toDate()
-
toCalendar
public java.util.GregorianCalendar toCalendar()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
String representation of date time in XML schema format.- Overrides:
toString
in classjava.lang.Object
-
valueOf
public static DateTime valueOf(java.lang.String str)
Creates a DateTime instance from XML schema serialization of xsd:dateTime.
-
-