Package eu.c6.gibraltar.api.common
Class DateUtil
java.lang.Object
eu.c6.gibraltar.api.common.DateUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCheck if two date are equals even if they are nullstatic DatefromISO8601String(String strDate) static DategetDateWithTime(Date date, String time) static DategetFirstDayOfTheYear(Date date, TimeZone timezone) static DategetLastDayOfTheYear(Date date, TimeZone timezone) static Periodstatic booleanstatic Datestatic StringtoGMTString(LocalDate localDate) static StringtoGMTString(Date date) static StringtoISO8601String(Date date) static StringtoISO8601String(Date date, TimeZone timeZone) static LocalDatetoLocalDate(Date date)
-
Constructor Details
-
DateUtil
public DateUtil()
-
-
Method Details
-
isDate
-
toISO8601String
-
toISO8601String
-
fromISO8601String
- Throws:
ParseException
-
toGMTString
-
toGMTString
-
getDateWithTime
- Throws:
ParseException
-
toLocalDate
-
toDate
-
areEqual
Check if two date are equals even if they are null- Parameters:
date- Date to check.- Returns:
trueif the date is null or empty.
-
getPeriod
-
getFirstDayOfTheYear
-
getLastDayOfTheYear
-