Package org.cdlib.mrt.utility
Class DateUtil
java.lang.Object
org.cdlib.mrt.utility.DateUtil
- Author:
- dloy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Dateget current Datestatic DategetCurrentDatePlus(long millSecs) return the Date for current + millisecond updatestatic StringgetCurrentDateString(String pattern) return String form of current date using passed patternstatic StringGet the current IsoDate Stringstatic DategetDateFromString(String stringDate, String pattern) Build a Date object using a String with an extraction patternstatic StringgetDateString(Date date, String pattern) Return String formatted form of passed Datestatic longGet current date a Epoch secondsstatic StringgetIsoDate(Date date) Build an IsoDate from a passed Datestatic DategetIsoDateFromString(String stringDate) Build Date from a displayed IsoDate stringstatic DategetIsoDateFromZString(String stringDate) Build Date from a displayed IsoDate stringstatic StringgetIsoZDate(Date date) Build an IsoDate from a passed Date
-
Field Details
-
ISOZPATTERN
- See Also:
-
ISOPATTERN
- See Also:
-
-
Constructor Details
-
DateUtil
public DateUtil()
-
-
Method Details
-
getCurrentDate
get current Date- Returns:
- current Date
-
getCurrentDatePlus
return the Date for current + millisecond update- Parameters:
millSecs- adjust for current date- Returns:
- adjusted time
-
getCurrentDateString
return String form of current date using passed pattern- Parameters:
pattern- pattern for building returned String- Returns:
- formatted current Date
-
getDateString
Return String formatted form of passed Date- Parameters:
date- Date to formatpattern- pattern to use for formatting- Returns:
- formatted passed Date
-
getDateFromString
Build a Date object using a String with an extraction pattern- Parameters:
stringDate-pattern-- Returns:
-
getIsoDateFromString
Build Date from a displayed IsoDate string- Parameters:
stringDate- iso string to convert to Date- Returns:
- converted Date
-
getIsoDateFromZString
Build Date from a displayed IsoDate string- Parameters:
stringDate- iso string to convert to Date- Returns:
- converted Date
-
getCurrentIsoDate
Get the current IsoDate String- Returns:
- current IsoDate
-
getIsoDate
Build an IsoDate from a passed Date- Parameters:
date- to conver to displayed IsoDate- Returns:
- displayed IsoDate
-
getIsoZDate
Build an IsoDate from a passed Date- Parameters:
date- to conver to displayed IsoDate- Returns:
- displayed IsoDate
-
getEpochUTCDate
public static long getEpochUTCDate()Get current date a Epoch seconds- Returns:
- Epoch second for current date
-