|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.plankton.DateUtil
public class DateUtil
class holding some useful date utilities
Field Summary | |
---|---|
static long |
MILLISECONDS_IN_DAY
|
static long |
SECONDS_IN_DAY
|
Constructor Summary | |
---|---|
DateUtil()
|
Method Summary | |
---|---|
static String |
getDateStr(Date date)
Easily format a date (default = SHORT). |
static String |
getDateStr(long millis)
Easily format a millis value as a date (default = SHORT) |
static Calendar |
getElapsed(long elapsed)
get a Calendar representing an elapsed amt of time |
static String |
getElapsedStr(long elapsed)
get a String describing an elapsed amt of time |
static Calendar |
getFirstDate(int theOffsetInDays)
|
static Calendar |
getFirstDateToday()
|
static Calendar |
getFirstDateTomorrow()
|
static Calendar |
getFirstDateYesterday()
|
static String |
getFullDateStr(Date date)
Easily format a date (FULL). |
static Calendar |
getLastDate(int theOffsetInDays)
|
static Calendar |
getLastDateToday()
|
static Calendar |
getLastDateTomorrow()
|
static Calendar |
getLastDateYesterday()
|
static String |
getLongDateStr(Date date)
Easily format a date (LONG). |
static String |
getMedDateStr(Date date)
Easily format a date (MEDIUM). |
static int |
getNumberOfDaysBetween(Date d1,
Date d2)
get the number of days between two dates (inclusive of the latter date - so the number of days between Monday of this week and Monday of next week will be 7). |
static String |
getShortDateStr(Date date)
Easily format a date (SHORT). |
static String |
getShortTimeStr()
Easily format the current time as a short time string (default) |
static String |
getShortTimeStr(Date time)
Easily format a date as a short time string (SHORT time) |
static String |
getShortTimeStr(long millis)
Easily format a millis value as a short time string (default) |
static String |
getTimestampStr()
Easily format the current time as a timestamp (default) |
static String |
getTimestampStr(Date timestamp)
Easily format a date as a timestamp (SHORT date, MEDIUM time) |
static String |
getTimestampStr(long millis)
Easily format a millis value as a timestamp (default) |
static String |
getTimeStr()
Easily format the current time as a time string (default) |
static String |
getTimeStr(Date time)
Easily format a date as a time string (MEDIUM time) |
static String |
getTimeStr(long millis)
Easily format a millis value as a time string (default) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long SECONDS_IN_DAY
public static final long MILLISECONDS_IN_DAY
Constructor Detail |
---|
public DateUtil()
Method Detail |
---|
public static String getDateStr(long millis)
public static String getDateStr(Date date)
public static String getShortDateStr(Date date)
public static String getMedDateStr(Date date)
public static String getLongDateStr(Date date)
public static String getFullDateStr(Date date)
public static String getTimestampStr()
public static String getTimestampStr(long millis)
public static String getTimestampStr(Date timestamp)
public static String getTimeStr()
public static String getTimeStr(long millis)
public static String getTimeStr(Date time)
public static String getShortTimeStr()
public static String getShortTimeStr(long millis)
public static String getShortTimeStr(Date time)
public static Calendar getElapsed(long elapsed)
public static String getElapsedStr(long elapsed)
public static int getNumberOfDaysBetween(Date d1, Date d2)
public static Calendar getFirstDateToday()
public static Calendar getLastDateToday()
public static Calendar getFirstDateTomorrow()
public static Calendar getLastDateTomorrow()
public static Calendar getFirstDateYesterday()
public static Calendar getLastDateYesterday()
public static Calendar getFirstDate(int theOffsetInDays)
public static Calendar getLastDate(int theOffsetInDays)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |