|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asterisk.util.DateUtil
public class DateUtil
Utility class to obtain the current date and allows to override with a fixed value for testing.
Method Summary | |
---|---|
static java.util.Date |
getDate()
Returns the real current date or the date set with overrideCurrentDate(). |
static void |
overrideCurrentDate(java.util.Date currentDate)
If set to a non null value uses the date given as current date on calls to getDate(). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void overrideCurrentDate(java.util.Date currentDate)
currentDate
- the date to return on calls to getDate() or null
to return
the real current date.public static java.util.Date getDate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |