|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--javatools.util.DateUtil
A utility class for use with dates.
| Constructor Summary | |
DateUtil()
|
|
| Method Summary | |
static int |
daysInMonth(int month,
int year)
Returns the number of days in a month depending on the year. |
static boolean |
leapYear(int year)
Checks if a year is a leap year. |
static int |
maxMonthSize(int month)
Returns the maximum value of days in a month. |
static java.sql.Date |
minusInfinity()
Return a date represting a long time in the past. |
static int |
monthSize(int month)
Returns the month size. |
static java.sql.Date |
plusInfinity()
Return a date representing a long time in the future. |
static java.sql.Timestamp |
timestampNow()
Return a Timestamp object representing the time now. |
static boolean |
validDate(int date,
int month,
int year)
Checks if a date is vald. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateUtil()
| Method Detail |
public static java.sql.Date minusInfinity()
public static java.sql.Date plusInfinity()
public static java.sql.Timestamp timestampNow()
public static boolean leapYear(int year)
year - The year to check.
true: the year is a leap year;
false: the year is a normal year.public static int monthSize(int month)
month - The month to check.
public static int maxMonthSize(int month)
month - The month to check.
public static int daysInMonth(int month,
int year)
month - The month to check.year - The year to use.
public static boolean validDate(int date,
int month,
int year)
date - The day in the month.month - The month.year - The year.
true: the date is valid;
false: the date is NOT valid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||