|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.bamboo.util.BambooDateUtils
public class BambooDateUtils
Method Summary | |
---|---|
static String |
dateToPortableString(Date date)
|
static String |
dateToPortableString(Date date,
TimeZone timeZone)
|
static Date |
fromIsoTimestampString(String dateString)
|
static long |
getMillisDistanceToNow(Date dateToCompare)
|
static long |
getMinutesDistanceToNow(Date dateToCompare)
|
static long |
getSecondsDistanceToNow(Date dateToCompare)
|
static boolean |
isWithinDays(Date earlierDate,
Date laterDate,
long days)
Returns whether the laterDate is not later than the number of "days" since the last earlierDate |
static boolean |
isWithinMillis(Date date1,
Date date2,
long millis)
Returns true if the two given dates are within the given number of millis. |
static Date |
makeReasonableDate(Date date)
Caps dates predating The Epoch to Epoch. |
static Date |
portableDateStringToDate(String dateString)
|
static String |
toIsoTimestampString(Date date)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean isWithinDays(Date earlierDate, Date laterDate, long days)
earlierDate
- - must not be nulllaterDate
- - must not be nulldays
- - must be a positive integer
public static boolean isWithinMillis(@Nullable Date date1, @Nullable Date date2, long millis)
date1
- - must not be nulldate2
- - must not be nullmillis
- - must be a positive long
public static String dateToPortableString(@NotNull Date date)
public static String dateToPortableString(@NotNull Date date, @NotNull TimeZone timeZone)
public static Date portableDateStringToDate(@NotNull String dateString) throws ParseException
ParseException
public static long getMinutesDistanceToNow(@NotNull Date dateToCompare)
public static long getSecondsDistanceToNow(@NotNull Date dateToCompare)
public static long getMillisDistanceToNow(@NotNull Date dateToCompare)
@NotNull public static String toIsoTimestampString(@NotNull Date date)
@NotNull public static Date fromIsoTimestampString(@NotNull String dateString)
public static Date makeReasonableDate(@NotNull Date date)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |