Class 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.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DateTime

        public DateTime​(long time)
    • Method Detail

      • getTime

        public long getTime()
      • toDate

        public java.sql.Date toDate()
      • toCalendar

        public java.util.GregorianCalendar toCalendar()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        String representation of date time in XML schema format.
        Overrides:
        toString in class java.lang.Object
      • valueOf

        public static DateTime valueOf​(java.lang.String str)
        Creates a DateTime instance from XML schema serialization of xsd:dateTime.