driver.ted.utilities
Class T_Date

java.lang.Object
  extended by driver.ted.utilities.T_Date
All Implemented Interfaces:
java.io.Serializable

public class T_Date
extends java.lang.Object
implements java.io.Serializable

Title: T_Utilities Description: This class represents a simple date, it is maintained in the utility package driver.ted.utilities Copyright: (c) 2001 - 2006

Version:
1.1 Changes:
Author:
Ted Driver
See Also:
Serialized Form

Constructor Summary
T_Date()
          Default constructor sets the date to January 1, 2000, the start of the J2000 epoch.
T_Date(int m, int d, int y)
          Constructor takes three integer arguments to set the initial date The month will be set between 1 and 12 even if a larger number is passed.
 
Method Summary
 void advanceDate(int m, int d, int y)
           
 int getDay()
           
 int getMonth()
           
 int getYear()
           
 void setDate(int m, int d, int y)
           
 void setDay(int d)
           
 void setMonth(int m)
           
 void setYear(int y)
           
 java.lang.String toMediumString()
          Returns a string representing the medium length date.
 java.lang.String toString()
          Returns the date in short format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

T_Date

public T_Date(int m,
              int d,
              int y)
Constructor takes three integer arguments to set the initial date The month will be set between 1 and 12 even if a larger number is passed. The resultant month will just the the supplied month mod 12. The day will be checked for consistency based upon the month previously set. A day that is not within the typical range for the given month will be caught and defaulted to 1 The Year must be greater than or equal to -4712 and less than 10000.

Parameters:
m - The Month
d - The Day
y - The Year

T_Date

public T_Date()
Default constructor sets the date to January 1, 2000, the start of the J2000 epoch.

Method Detail

advanceDate

public void advanceDate(int m,
                        int d,
                        int y)
Parameters:
m -
d -
y -

setDate

public void setDate(int m,
                    int d,
                    int y)
Parameters:
m -
d -
y -

setMonth

public void setMonth(int m)
Parameters:
m -

setDay

public void setDay(int d)
Parameters:
d -

setYear

public void setYear(int y)
Parameters:
y -

getMonth

public int getMonth()
Returns:
The integer month

getDay

public int getDay()
Returns:
Tthe integer day

getYear

public int getYear()
Returns:
The integer year

toString

public java.lang.String toString()
Returns the date in short format. Example: 12/14/2002

Overrides:
toString in class java.lang.Object
Returns:
The string representing the short date

toMediumString

public java.lang.String toMediumString()
Returns a string representing the medium length date. Example: December 14, 2002

Returns:
A String representing the date defined by this object