Class DateUtility

java.lang.Object
com.morpheusdata.core.util.DateUtility

public class DateUtility extends Object
  • Field Details

    • gmtTimezone

      public static final TimeZone gmtTimezone
    • serverTimezone

      public static final TimeZone serverTimezone
  • Constructor Details

    • DateUtility

      public DateUtility()
  • Method Details

    • formatDate

      public static String formatDate(Date date)
    • formatDate

      public static String formatDate(Date date, String outputFormat)
    • parseDate

      public static Date parseDate(Date date)
    • parseDate

      public static Date parseDate(CharSequence date)
    • parseDateWithFormat

      public static Date parseDateWithFormat(String dateStr, String format) throws ParseException
      Throws:
      ParseException
    • parseDateWithFormat

      public static Date parseDateWithFormat(String dateStr, String format, TimeZone timezone) throws ParseException
      Throws:
      ParseException
    • getStartOfNextGmtMonth

      public static Date getStartOfNextGmtMonth(Date date)
    • getEndOfGmtDay

      public static Date getEndOfGmtDay(Date date)
    • getEndOfGmtHour

      public static Date getEndOfGmtHour(Date date)
    • getStartOfDay

      public static Date getStartOfDay()
    • getStartOfDay

      public static Date getStartOfDay(TimeZone timezone)
    • getStartOfMonth

      public static Date getStartOfMonth()
    • getStartOfMonth

      public static Date getStartOfMonth(TimeZone timezone)
    • getStartOfYear

      public static Date getStartOfYear()
    • getStartOfYear

      public static Date getStartOfYear(TimeZone timezone)
    • getStartOfYear

      public static Date getStartOfYear(Integer year)
    • getStartOfYear

      public static Date getStartOfYear(Integer year, TimeZone timezone)
    • getStartOfDateMonth

      public static Date getStartOfDateMonth(Date date)
    • getStartOfDateMonth

      public static Date getStartOfDateMonth(Date date, TimeZone timezone)
    • getEndOfDateMonth

      public static Date getEndOfDateMonth(Date date)
    • getEndOfDateMonth

      public static Date getEndOfDateMonth(Date date, TimeZone timezone)
    • getStartOfDateDay

      public static Date getStartOfDateDay(Date date)
    • getStartOfDateDay

      public static Date getStartOfDateDay(Date date, TimeZone timezone)
    • getEndOfDateDay

      public static Date getEndOfDateDay(Date date)
    • getEndOfDateDay

      public static Date getEndOfDateDay(Date date, TimeZone timezone)
    • getGmtDate

      public static Date getGmtDate(Date date)
    • getStartOfHour

      public static Date getStartOfHour(Date date)
    • getStartOfDay

      public static Date getStartOfDay(Date date)
    • getStartOfMonth

      public static Date getStartOfMonth(Date date)
    • getEndOfMonth

      public static Date getEndOfMonth(Date date)
    • getEndOfMonth

      public static Date getEndOfMonth(Date date, Boolean doMillis)
    • getEndOfYear

      public static Date getEndOfYear(Date date)
    • getEndOfYear

      public static Date getEndOfYear(Date date, Boolean doMillis)
    • getEndOfDay

      public static Date getEndOfDay(Date date)
    • getEndOfDay

      public static Date getEndOfDay(Date date, Boolean doMillis)
    • getEndOfHour

      public static Date getEndOfHour(Date date)
    • getEndOfHour

      public static Date getEndOfHour(Date date, Boolean doMillis)
    • getStartOfGmtHour

      public static Date getStartOfGmtHour(Date date)
    • getStartOfGmtDay

      public static Date getStartOfGmtDay(Date date)
    • getStartOfGmtMonth

      public static Date getStartOfGmtMonth(Date date)
    • getStartOfGmtYear

      public static Date getStartOfGmtYear(Date date)
    • getEndOfGmtMonth

      public static Date getEndOfGmtMonth(Date date)
    • getEndOfGmtYear

      public static Date getEndOfGmtYear(Date date)
    • getGregorianCalendarForDate

      public static Calendar getGregorianCalendarForDate(Date date, TimeZone timezone)
    • getCalendarForDate

      public static Calendar getCalendarForDate(Date date, TimeZone timezone)
    • addToDate

      public static Date addToDate(Date date, int field, int amount)