|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.nurelm.util.DateUtil
Perform date-specific functions, especially ones that are NuRelm app specific, such as NuContent's nu_today comparisons.
| Field Summary | |
|---|---|
static java.lang.String[] |
DAYSINWEEK
|
static java.lang.String |
NU_TODAY
|
| Constructor Summary | |
|---|---|
DateUtil()
|
|
| Method Summary | |
|---|---|
static int |
compareDates(java.lang.String date1,
java.lang.String date2)
Compares input strings formated as dates (mm/dd/yyyy or mm/dd/yy) Returns 0 if dates are equal positive num if date1 > date2 negative num if date2 < date2 result of String.compareTo if inputs aren't dates Special input value of "NU_TODAY" represents today's date |
static java.lang.String |
getDateString(java.util.Date date)
Creates a date string suitable for storage in the DB in yyyy-mm-dd format. |
static java.lang.String |
getDateString(int month,
int day,
int year)
Creates a date string suitable for storage in the DB in yyyy-mm-dd format. |
static int |
getDaysInMonth(int year,
int month)
|
static int |
getFirstOfMonth(int year,
int month)
|
static int |
getJanuaryFirst(int year)
|
static int |
getNumberRowsNeeded(int year,
int month)
|
static java.util.Date |
getOffsetDate(java.lang.String dateString)
|
static java.lang.String |
getToday()
Returns current date string in mm/dd/yyyy or mm/dd/yy format. |
static boolean |
isDate(java.lang.String date)
Checks if string is in mm/dd/yyyy or mm/dd/yy format. |
static boolean |
isLeapYear(int year)
|
static java.lang.String |
shortDateToLong(java.lang.String content)
Converts a date in yyyy-mm-dd format to a long date in Month dd, yyyy format. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String NU_TODAY
public static final java.lang.String[] DAYSINWEEK
| Constructor Detail |
public DateUtil()
| Method Detail |
public static java.util.Date getOffsetDate(java.lang.String dateString)
public static boolean isDate(java.lang.String date)
date - The date to check.
true if it is in the proper format.
public static java.lang.String getDateString(int month,
int day,
int year)
public static java.lang.String getDateString(java.util.Date date)
public static java.lang.String shortDateToLong(java.lang.String content)
content - Short date string to be converted
public static java.lang.String getToday()
public static int compareDates(java.lang.String date1,
java.lang.String date2)
date1 - DOCUMENT ME!date2 - DOCUMENT ME!
public static int getNumberRowsNeeded(int year,
int month)
public static int getFirstOfMonth(int year,
int month)
public static int getDaysInMonth(int year,
int month)
public static boolean isLeapYear(int year)
public static int getJanuaryFirst(int year)
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||