Example usage for Java org.joda.time Instant fields, constructors, methods, implement or subclass
The text is from its open source code.
Instant | EPOCH The Java epoch of 1970-01-01T00:00:00Z. |
Instant(long instant) Constructs an instance set to the milliseconds from 1970-01-01T00:00:00Z. | |
Instant(Object instant) Constructs an instance from an Object that represents a datetime. | |
Instant() Constructs an instance set to the current system millisecond time. |
int | compareTo(ReadableInstant other) Compares this object with the specified object for ascending millisecond instant order. |
boolean | equals(Object readableInstant) Compares this object with the specified object for equality based on the millisecond instant, chronology and time zone. |
int | get(DateTimeFieldType type) Get the value of one of the fields of a datetime using the chronology of the instant. |
Chronology | getChronology() Gets the chronology of the instant, which is ISO in the UTC zone. |
long | getMillis() Gets the milliseconds of the instant. |
DateTimeZone | getZone() Gets the time zone of the instant from the chronology. |
boolean | isAfter(long instant) Is this instant strictly after the millisecond instant passed in comparing solely by millisecond. |
boolean | isAfterNow() Is this instant strictly after the current instant comparing solely by millisecond. |
boolean | isBefore(long instant) Is this instant strictly before the millisecond instant passed in comparing solely by millisecond. |
boolean | isBeforeNow() Is this instant strictly before the current instant comparing solely by millisecond. |
boolean | isEqual(long instant) Is this instant equal to the millisecond instant passed in comparing solely by millisecond. |
boolean | isEqualNow() Is this instant equal to the current instant comparing solely by millisecond. |
Instant | minus(long duration) Gets a copy of this instant with the specified duration taken away. |
Instant | minus(ReadableDuration duration) Gets a copy of this instant with the specified duration taken away. |
Instant | now() Obtains an Instant set to the current system millisecond time. |
Instant | parse(String str) Parses an Instant from the specified string. |
Instant | parse(String str, DateTimeFormatter formatter) Parses an Instant from the specified string using a formatter. |
Instant | plus(long duration) Gets a copy of this instant with the specified duration added. |
Instant | plus(ReadableDuration duration) Gets a copy of this instant with the specified duration added. |
Date | toDate() Get the date time as a java.util.Date . |
DateTime | toDateTime(DateTimeZone zone) Get this object as a DateTime using the same chronology but a different zone. |
DateTime | toDateTime() Get this object as a DateTime using ISOChronology in the default zone. |
Instant | toInstant() Get this object as an Instant by returning this . |
MutableDateTime | toMutableDateTime() Get this object as a MutableDateTime using ISOChronology in the default zone. |
String | toString() Output the date time in ISO8601 format (yyyy-MM-ddTHH:mm:ss.SSSZZ). |
String | toString(DateTimeFormatter formatter) Uses the specified formatter to convert this partial to a String. |
Instant | withMillis(long newMillis) Gets a copy of this instant with different millis. |