com.interfaceware.chameleon
Class DblDate

java.lang.Object
  extended by java.util.Date
      extended by com.interfaceware.chameleon.DblDate
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Date>

public class DblDate
extends java.util.Date

This class handles dates in Chameleon. It is a member of ChameleonDateTime.

See Also:
ChameleonDateTime, Serialized Form

Constructor Summary
DblDate()
          Construct a DblDate object.
DblDate(java.util.Date ADate)
          Construct a DblDate object with the specified Date.
DblDate(double date)
          Construct a DblDate object with the specified double date.
DblDate(long date)
          Construct a DblDate object with the specified long date.
 
Method Summary
static DblDate now()
          Get the current date and time.
 void setDblDate(double dtSrc)
          Set the DblDate object to the specified double value.
 double toDouble()
          Convert the DblDate object to a double.
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DblDate

public DblDate(java.util.Date ADate)
Construct a DblDate object with the specified Date.


DblDate

public DblDate()
Construct a DblDate object. This constructs a DblDate object and initializes with the time at which it was allocated.


DblDate

public DblDate(long date)
Construct a DblDate object with the specified long date. date is the number of milliseconds since January 1, 1970 00:00:00 GMT.


DblDate

public DblDate(double date)
Construct a DblDate object with the specified double date. date measures the number of days from midnight (12AM) 30 December 1899. For example, 6AM 1 January 1900 is represented as 2.25. Hours and minutes are represented as fractional days, i.e., 0.25 * 24hours = 6AM.

Method Detail

now

public static DblDate now()
Get the current date and time.


setDblDate

public void setDblDate(double dtSrc)
Set the DblDate object to the specified double value. dtSrc measures the number of days from midnight (12AM) 30 December 1899. For example, 6AM 1 January 1900 is represented as 2.25. Hours and minutes are represented as fractional days, i.e., 0.25 * 24hours = 6AM.


toDouble

public double toDouble()
Convert the DblDate object to a double. The return value measures the number of days from midnight (12AM) 30 December 1899. For example, 6AM 1 January 1900 is represented as 2.25. Hours and minutes are represented as fractional days, i.e., 0.25 * 24hours = 6AM.