public class OffsetDateTime
extends Object
GDK enhancements for OffsetDateTime.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public OffsetDateTime |
clearTime()Returns an OffsetDateTime with the time portion cleared. |
|
public String |
format(String pattern)Formats this date/time with the provided DateTimeFormatter pattern. |
|
public String |
format(FormatStyle dateTimeStyle)Formats this date/time in the provided, localized FormatStyle. |
|
public String |
getDateString()Formats this date/time with the DateTimeFormatter.ISO_OFFSET_DATE formatter. |
|
public String |
getDateTimeString()Formats this date/time with the DateTimeFormatter.ISO_OFFSET_DATE_TIME formatter. |
|
public String |
getTimeString()Formats this date/time with the DateTimeFormatter.ISO_OFFSET_TIME formatter. |
|
public OffsetDateTime |
minus(long seconds)Returns an OffsetDateTime that is seconds seconds before this date/time. |
|
public OffsetDateTime |
next()Returns an OffsetDateTime one second after this date/time. |
|
public static OffsetDateTime |
parse(OffsetDateTime type, CharSequence text, String pattern)Parse text into an OffsetDateTime using the provided pattern. |
|
public OffsetDateTime |
plus(long seconds)Returns an OffsetDateTime that is seconds seconds after this date/time. |
|
public OffsetDateTime |
previous()Returns an OffsetDateTime one second before this date/time. |
|
public Calendar |
toCalendar()Returns a generally equivalent instance of Calendar. |
|
public Date |
toDate()Returns a generally equivalent instance of Date. |
| 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 OffsetDateTime with the time portion cleared.
Formats this date/time with the provided DateTimeFormatter pattern.
pattern - the formatting patternFormats this date/time in the provided, localized FormatStyle.
dateTimeStyle - the FormatStyleFormats this date/time with the DateTimeFormatter.ISO_OFFSET_DATE formatter.
Formats this date/time with the DateTimeFormatter.ISO_OFFSET_DATE_TIME formatter.
Formats this date/time with the DateTimeFormatter.ISO_OFFSET_TIME formatter.
Returns an OffsetDateTime that is seconds seconds before this date/time.
seconds - the number of seconds to subtractReturns an OffsetDateTime one second after this date/time.
Parse text into an OffsetDateTime using the provided pattern.
type - placeholder variable used by Groovy categories; ignored for default static methodstext - String to be parsed to create the date instancepattern - pattern used to parse the text Returns an OffsetDateTime that is seconds seconds after this date/time.
seconds - the number of seconds to addReturns an OffsetDateTime one second before this date/time.
Returns a generally equivalent instance of Calendar. The time value of the returned calendar is truncated to milliseconds and the time zone is based on the offset of this date/time.