public class Instant
extends Object
GDK enhancements for Instant.
| 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. |
| Methods inherited from class | Name |
|---|---|
class Object |
addShutdownHook, any, any, asBoolean, asType, 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, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits |
Returns an Instant that is seconds seconds before this instant.
seconds - the number of seconds to subtractReturns an Instant that is one second after this instant.
Returns an Instant that is seconds seconds after this instant.
seconds - the number of seconds to addReturns an Instant that one second before this instant.
Returns a generally equivalent Calendar in the GMT time zone, truncated to milliseconds.