Package: org.apache.groovy.dateutil

## [Java] Class TimeCategory

- org.apache.groovy.dateutil.TimeCategory

-     public class TimeCategory
      extends Object

  A dequirked, `java.util.Date`-flavored parallel to the legacy `groovy.time.TimeCategory`. Use as:

       use (org.apache.groovy.dateutil.TimeCategory) {
           println 1.minute.from.now
           println 10.hours.ago
           def someDate = new Date()
           println someDate - 3.months
       }

  Differences from the legacy class: the deprecated `getTimeZone` and the `getDaylightSavingsOffset` helpers are dropped, and `.ago`/`.from.now` preserve the time-of-day (see BaseDuration).
  See Also:
    BaseDuration

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static Duration` | `getDay(Integer self)`
    `` | `public static Duration` | `getDays(Integer self)`
    `` | `public static TimeDuration` | `getHour(Integer self)`
    `` | `public static TimeDuration` | `getHours(Integer self)`
    `` | `public static TimeDuration` | `getMillisecond(Integer self)`
    `` | `public static TimeDuration` | `getMilliseconds(Integer self)`
    `` | `public static TimeDuration` | `getMinute(Integer self)`
    `` | `public static TimeDuration` | `getMinutes(Integer self)`
    `` | `public static DatumDependentDuration` | `getMonth(Integer self)`
    `` | `public static DatumDependentDuration` | `getMonths(Integer self)`
    `` | `public static TimeDuration` | `getSecond(Integer self)`
    `` | `public static TimeDuration` | `getSeconds(Integer self)`
    `` | `public static Duration` | `getWeek(Integer self)`
    `` | `public static Duration` | `getWeeks(Integer self)`
    `` | `public static DatumDependentDuration` | `getYear(Integer self)`
    `` | `public static DatumDependentDuration` | `getYears(Integer self)`
    `` | `public static Date` | `minus(Date date, BaseDuration duration)`
    `` | `public static TimeDuration` | `minus(Date lhs, Date rhs)`
    `` | `public static Date` | `plus(Date date, BaseDuration duration)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public static Duration getDay(Integer self)

    - #### public static Duration getDays(Integer self)

    - #### public static TimeDuration getHour(Integer self)

    - #### public static TimeDuration getHours(Integer self)

    - #### public static TimeDuration getMillisecond(Integer self)

    - #### public static TimeDuration getMilliseconds(Integer self)

    - #### public static TimeDuration getMinute(Integer self)

    - #### public static TimeDuration getMinutes(Integer self)

    - #### public static DatumDependentDuration getMonth(Integer self)

    - #### public static DatumDependentDuration getMonths(Integer self)

    - #### public static TimeDuration getSecond(Integer self)

    - #### public static TimeDuration getSeconds(Integer self)

    - #### public static Duration getWeek(Integer self)

    - #### public static Duration getWeeks(Integer self)

    - #### public static DatumDependentDuration getYear(Integer self)

    - #### public static DatumDependentDuration getYears(Integer self)

    - #### public static Date minus(Date date, BaseDuration duration)

    - #### public static TimeDuration minus(Date lhs, Date rhs)

    - #### public static Date plus(Date date, BaseDuration duration)