All Packages Class Hierarchy This Package Previous Next Index
Class java.lancs.OurDate
java.lang.Object
|
+----java.lancs.OurDate
- public class OurDate
- extends Object
-
APR
- Constant - Month April
-
AUG
- Constant - Month August
-
DEC
- Constant - Month December
-
FEB
- Constant - Month February
-
JAN
- Constant - Month January
-
JUL
- Constant - Month July
-
JUN
- Constant - Month June
-
MAR
- Constant - Month March
-
MAY
- Constant - Month May
-
NOV
- Constant - Month November
-
OCT
- Constant - Month October
-
SEP
- Constant - Month September
-
OurDate()
- Creates an instance of the OurDate class with default values
(day, month and year zero)
-
OurDate(int, int, int)
- Creates an instance of the OurDate class with specified attribute
values
-
copy()
- return a copy of the date
-
getDayOfMonth()
- returns the day within the month attribute of the date
-
getMonth()
- returns the month attribute of the date
-
getYear()
- returns the year attribute of the date
-
setDayOfMonth(int)
- set the day within the month attribute of the date
-
setMonth(int)
- set the month attribute of the date
-
setYear(int)
- set the year attribute of the date
-
subtract(OurDate, OurDate)
- find the number of days between two dates
-
toString()
- return a string representing the date
JAN
public static final int JAN
- Constant - Month January
FEB
public static final int FEB
- Constant - Month February
MAR
public static final int MAR
- Constant - Month March
APR
public static final int APR
- Constant - Month April
MAY
public static final int MAY
- Constant - Month May
JUN
public static final int JUN
- Constant - Month June
JUL
public static final int JUL
- Constant - Month July
AUG
public static final int AUG
- Constant - Month August
SEP
public static final int SEP
- Constant - Month September
OCT
public static final int OCT
- Constant - Month October
NOV
public static final int NOV
- Constant - Month November
DEC
public static final int DEC
- Constant - Month December
OurDate
public OurDate()
- Creates an instance of the OurDate class with default values
(day, month and year zero)
OurDate
public OurDate(int y,
int m,
int d)
- Creates an instance of the OurDate class with specified attribute
values
- Parameters:
- y - the year number
- m - the month number (1 to 12)
- d - the day number within the month (1 to 31)
getDayOfMonth
public int getDayOfMonth()
- returns the day within the month attribute of the date
- Returns:
- the day within the month attribute of the date
getMonth
public int getMonth()
- returns the month attribute of the date
- Returns:
- the month attribute of the date
getYear
public int getYear()
- returns the year attribute of the date
- Returns:
- the year attribute of the date
setDayOfMonth
public void setDayOfMonth(int d)
- set the day within the month attribute of the date
- Parameters:
- d - the day within the month attribute of the date
setMonth
public void setMonth(int m)
- set the month attribute of the date
- Parameters:
- m - the month attribute of the date
setYear
public void setYear(int y)
- set the year attribute of the date
- Parameters:
- y - the year attribute of the date
subtract
public static int subtract(OurDate low,
OurDate high)
- find the number of days between two dates
- Parameters:
- low - the earlier date
- high - the later date
- Returns:
- the number of days difference
copy
public OurDate copy()
- return a copy of the date
- Returns:
- a copy of the OurDate instance
toString
public String toString()
- return a string representing the date
- Returns:
- a string representing the date "day/month/year"
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index