DateUtil (gCube Species Discovery 3.3.0-SNAPSHOT API)
Date: 2013-07-19

org.gcube.portlets.user.speciesdiscovery.server.util

## Class DateUtil

- java.lang.Object
- - org.gcube.portlets.user.speciesdiscovery.server.util.DateUtil

-     public class DateUtil
      extends Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DateUtil.TIMETYPE`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DATE_TIME_FORMAT`
    `static String` | `DATE_TIME_FORMAT_2`
    `static org.apache.log4j.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DateUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `dateToDateFormatString(Date date)`
    `static Date` | `getDate(Calendar calendar)`
    `static Date` | `getDateFormat(Calendar calendar)`
    `static String` | `getDifference(long date1, long date2)`
    `static long` | `getDifference(long date1, long date2, DateUtil.TIMETYPE timeType)`
    `static Date` | `millisecondsToDate(long milliseconds)`
    `static Date` | `stringToDateFormat(String date)`
    `static Date` | `toDate(Calendar calendar)`
    `static Date` | `toDateFormat(Calendar calendar)`
    `static String` | `toDateFormatToString(Calendar calendar)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          public static org.apache.log4j.Logger logger

    - #### DATE_TIME_FORMAT

          public static final String DATE_TIME_FORMAT

      See Also:
        Constant Field Values

    - #### DATE_TIME_FORMAT_2

          public static final String DATE_TIME_FORMAT_2

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DateUtil

          public DateUtil()

  - ### Method Detail

    - #### toDate

          public static Date toDate(Calendar calendar)

    - #### toDateFormatToString

          public static String toDateFormatToString(Calendar calendar)

    - #### toDateFormat

          public static Date toDateFormat(Calendar calendar)

    - #### getDateFormat

          public static Date getDateFormat(Calendar calendar)

    - #### getDate

          public static Date getDate(Calendar calendar)

    - #### stringToDateFormat

          public static Date stringToDateFormat(String date)

    - #### dateToDateFormatString

          public static String dateToDateFormatString(Date date)

    - #### millisecondsToDate

          public static Date millisecondsToDate(long milliseconds)

    - #### getDifference

          public static long getDifference(long date1,
                           long date2,
                           DateUtil.TIMETYPE timeType)

    - #### getDifference

          public static String getDifference(long date1,
                             long date2)

      Parameters:
        `date1` -
        `date2` -
      Returns:
        difference between two date in this format: N°day/days HH:mm:ss

Copyright © 2013. All Rights Reserved.