|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.pow2.util.DateUtil
Date utility class.
Constructor Summary | |
DateUtil()
|
Method Summary | |
static Date |
addDays(Date startDate,
int days)
Add the input number of days to the start Date object. |
static Date |
addDays(String startDate,
String dateFormat,
int days)
Add the input number of days to the startDate string representation. |
static String |
getCurrentDateString(String dateFormat)
Get the current date string representation. |
static Date |
getDate(String sDate,
String dateFormat)
Get a java Date object from an input date string representation. |
static String |
getDateString(Date date,
String dateFormat)
Get the string representation of the input Date object |
static boolean |
isDateBetween(Date d,
Date d1,
Date d2)
Check if the d input date is between d1 and
d2 . |
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 String getCurrentDateString(String dateFormat)
dateFormat
- the input dateFormat.
See the java.text.SimpleDateFormat
API for date format
string examplespublic static String getDateString(Date date, String dateFormat)
date
- the input Date objectdateFormat
- a date format string like "dd/MM/yyyy"
public static Date getDate(String sDate, String dateFormat)
java.text.SimpleDateFormat
API for date format string
examples.
sDate
- the date string representationdateFormat
- a date format string like "dd/MM/yyyy"
public static Date addDays(String startDate, String dateFormat, int days)
startDate
- the start date string representationdateFormat
- the start date formatdays
- the number of days to add to the startDate
public static Date addDays(Date startDate, int days)
startDate
- the start Date objectdays
- the number of days to add to the startDate object
public static boolean isDateBetween(Date d, Date d1, Date d2)
d
input date is between d1
and
d2
.
d
- the date to checkd1
- the lower boundary dated2
- the upper boundary date
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |