com.ihr.xbrl.util

## Class TimeUtils

- java.lang.Object
- - com.ihr.xbrl.util.TimeUtils

-     public class TimeUtils
      extends java.lang.Object

  The Class TimeUtils.
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimeUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.xml.datatype.Duration` | `calculateDuration(java.util.GregorianCalendar start, java.util.GregorianCalendar end)` Calculates the Duration between two GregorianCalendar dates.
    `static javax.xml.datatype.Duration` | `createDuration(java.lang.String durationString)` Creates the duration.
    `static java.util.TimeZone` | `getNoTimeZoneTimeZone()` Returns the time zone assigned to dates that has no specific time zone.
    `static java.util.GregorianCalendar` | `normalizeTimeZone(java.util.GregorianCalendar calendar)` This method removes time zone information from an instance of a GregorianCalendar and makes it usable for the XBRL API.
    `static java.lang.String` | `toTime(long timeMillis)` Display the amount of time indicated in milliseconds as one string according to locale.

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

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

- - ### Constructor Detail

    - #### TimeUtils

          public TimeUtils()

  - ### Method Detail

    - #### normalizeTimeZone

          public static java.util.GregorianCalendar normalizeTimeZone(java.util.GregorianCalendar calendar)

      This method removes time zone information from an instance of a GregorianCalendar and makes it usable for the XBRL API. Since version 2.8.1 all periods and dates must not have local time zone information
      Parameters:
        `calendar` - input instance of GregorianCalendar the time zone will be removed
      Returns:
        a new instance of GregorianCalendar without Time Zone
      Since:
        2.8.1

    - #### getNoTimeZoneTimeZone

          public static java.util.TimeZone getNoTimeZoneTimeZone()

      Returns the time zone assigned to dates that has no specific time zone.
      Returns:
        LLL time zone. No DST code is LLL

    - #### calculateDuration

          public static javax.xml.datatype.Duration calculateDuration(java.util.GregorianCalendar start,
                                                      java.util.GregorianCalendar end)

      Calculates the Duration between two GregorianCalendar dates.
      Parameters:
        `start` - as a GregorianCalendar
        `end` - as a GregorianCalendar
      Returns:
        a javax.xml.datatype.Duration instance

    - #### createDuration

          public static javax.xml.datatype.Duration createDuration(java.lang.String durationString)

      Creates the duration.
      Parameters:
        `durationString` - the duration string
      Returns:
        the duration

    - #### toTime

          public static java.lang.String toTime(long timeMillis)

      Display the amount of time indicated in milliseconds as one string according to locale.
      Parameters:
        `timeMillis` - the time millis
      Returns:
        the string