|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectapplicationLogic.utility.Date
public class Date
This class has NO SEMANTIC CORRECTNESS CHECKING IN SETTORS/CONSTRUCTORS. Every time you wish to use a date from this class, check it for validity with checkDate().
| Field Summary | |
|---|---|
static int |
DAYINDEX
|
static int |
MAXDAYS
|
static int |
MAXMONTHS
|
static int |
MINYEAR
|
static int |
MONTHINDEX
|
static int |
YEARINDEX
|
| Constructor Summary | |
|---|---|
Date(int year,
int month,
int day)
|
|
Date(java.lang.String date)
Constructor for date |
|
| Method Summary | |
|---|---|
boolean |
checkDate()
Check whether if date is valid or not. |
static int |
getCurrentYear()
|
int |
getDay()
Retrieve the day |
int |
getMonth()
Retrieve the month |
int |
getYear()
Retrieve the year |
static java.lang.String |
monthToString(int month)
Retrieve the corresponding month in String format. |
void |
setDay(int day)
Setting the day |
void |
setMonth(int month)
Setting the month |
void |
setYear(int year)
Setting the year |
java.lang.String |
toString()
Output date in format 'YYYY-MM-DD' |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int YEARINDEX
public static final int MONTHINDEX
public static final int DAYINDEX
public static final int MAXMONTHS
public static final int MAXDAYS
public static final int MINYEAR
| Constructor Detail |
|---|
public Date(int year,
int month,
int day)
public Date(java.lang.String date)
date - - in the format "YYYY-MM-DD"| Method Detail |
|---|
public static int getCurrentYear()
public boolean checkDate()
public static java.lang.String monthToString(int month)
month - - the month in integer
public void setYear(int year)
year - public void setMonth(int month)
month - public void setDay(int day)
day - public int getYear()
public int getMonth()
public int getDay()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||