Class DateState

java.lang.Object
org.cdlib.mrt.core.DateState
All Implemented Interfaces:
Serializable, StateStringInf

public class DateState extends Object implements StateStringInf, Serializable
Basic Date State information
Author:
dloy
See Also:
  • Field Details

  • Constructor Details

    • DateState

      public DateState(Date date)
      Constructor
      Parameters:
      date - used for state
    • DateState

      public DateState(long seconds)
      Constructor
      Parameters:
      seconds - base second count
    • DateState

      public DateState(String dateTime)
      Contructor
      Parameters:
      dateTime - Iso format for date
    • DateState

      public DateState()
      Contructor
      Parameters:
      dateTime - Iso format for date
  • Method Details

    • getDate

      public Date getDate()
      Get standard Date for this State
      Returns:
      standard date
    • setDate

      public void setDate(Date date)
      Set Date value for this State
      Parameters:
      date - Date value used for State
    • getIsoDate

      public String getIsoDate()
      Return date in Iso format
      Returns:
      Iso format date
    • getIsoZDate

      public String getIsoZDate()
      Return date in Iso format - Zulu
      Returns:
      Iso format date
    • toString

      public String toString()
      Default toString to Iso format date
      Overrides:
      toString in class Object
      Returns:
    • getTimeLong

      public long getTimeLong()
      Return second format of this Date
      Returns:
      second count for this Date
    • maxTime

      public DateState maxTime(DateState test)
      return max Date comparing this Date for another DateState
      Parameters:
      test - compare DateState
      Returns:
      this or test DateState that is max date