Package: java.time

## [Java] Class Instant

- java.time.Instant

-     public class Instant
      extends Object

  GDK enhancements for Instant.

  displayName:
    Instant
  receiverFqcn:
    java.time.Instant

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Instant` | `minus(long seconds)` Returns an Instant that is `seconds` seconds before this instant.
    `` | `public Instant` | `next()` Returns an Instant that is one second after this instant.
    `` | `public Instant` | `plus(long seconds)` Returns an Instant that is `seconds` seconds after this instant.
    `` | `public Instant` | `previous()` Returns an Instant that one second before this instant.
    `` | `public Calendar` | `toCalendar()` Returns a generally equivalent Calendar in the GMT time zone, truncated to milliseconds.
    `` | `public Date` | `toDate()` Returns a generally equivalent Date according the number of milliseconds since the epoch, adjusted into the system default time zone.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `addShutdownHook, any, any, asBoolean, asType, clamp, clamp, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, takeIf, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits`

- - ### Method Detail

    - #### public Instant minus(long seconds)

      Returns an Instant that is `seconds` seconds before this instant.

      Parameters:
        `seconds` - the number of seconds to subtract
      Returns:
        an Instant
      Since:
        2.5.0

    - #### public Instant next()

      Returns an Instant that is one second after this instant.

      Returns:
        an Instant one-second ahead
      Since:
        2.5.0

    - #### public Instant plus(long seconds)

      Returns an Instant that is `seconds` seconds after this instant.

      Parameters:
        `seconds` - the number of seconds to add
      Returns:
        an Instant
      Since:
        2.5.0

    - #### public Instant previous()

      Returns an Instant that one second before this instant.

      Returns:
        an Instant one-second behind
      Since:
        2.5.0

    - #### public Calendar toCalendar()

      Returns a generally equivalent Calendar in the GMT time zone, truncated to milliseconds.

      Returns:
        a Calendar
      Since:
        2.5.0

    - #### public Date toDate()

      Returns a generally equivalent Date according the number of milliseconds since the epoch, adjusted into the system default time zone.

      Returns:
        a Date
      Since:
        2.5.0