Return type | Name and parameters |
---|---|
LocalDateTime
|
clearTime()
Returns a LocalDateTime with the time portion cleared. |
String
|
format(String pattern)
Formats this date/time with the provided DateTimeFormatter pattern. |
String
|
format(FormatStyle dateTimeStyle)
Formats this date/time in the provided, localized FormatStyle. |
String
|
getDateString()
Formats this date/time with the DateTimeFormatter#ISO_LOCAL_DATE formatter. |
String
|
getDateTimeString()
Formats this date/time with the DateTimeFormatter#ISO_LOCAL_DATE_TIME formatter. |
String
|
getTimeString()
Formats this date/time with the DateTimeFormatter#ISO_LOCAL_TIME formatter. |
ZonedDateTime
|
leftShift(ZoneId zone)
Returns a OffsetDateTime of this date/time and the provided ZoneId. |
OffsetDateTime
|
leftShift(ZoneOffset offset)
Returns an OffsetDateTime of this date/time and the provided ZoneOffset. |
LocalDateTime
|
minus(long seconds)
Returns a LocalDateTime that is seconds seconds before this date/time.
|
LocalDateTime
|
next()
Returns a LocalDateTime that is one second after this date/time. |
LocalDateTime
|
parse(CharSequence text, String pattern)
Parse text into a LocalDateTime using the provided pattern. |
LocalDateTime
|
plus(long seconds)
Returns a LocalDateTime that is seconds seconds after this date/time.
|
LocalDateTime
|
previous()
Returns a LocalDateTime that is one second before this date/time. |
Calendar
|
toCalendar()
Returns a generally equivalent instance of Calendar. |
Date
|
toDate()
Returns a generally equivalent instance of Date. |
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
, 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
, split
, sprintf
, sprintf
, stream
, tap
, toString
, use
, use
, use
, with
, with
, withCloseable
, withStream
, withTraits
Returns a LocalDateTime 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_LOCAL_DATE formatter.
Formats this date/time with the DateTimeFormatter#ISO_LOCAL_DATE_TIME formatter.
Formats this date/time with the DateTimeFormatter#ISO_LOCAL_TIME formatter.
Returns a OffsetDateTime of this date/time and the provided ZoneId.
zone
- a ZoneIdReturns an OffsetDateTime of this date/time and the provided ZoneOffset.
offset
- a ZoneOffsetReturns a LocalDateTime that is seconds
seconds before this date/time.
seconds
- the number of seconds to subtractReturns a LocalDateTime that is one second after this date/time.
Parse text into a LocalDateTime using the provided pattern. Note: the order of parameters differs from versions of this method for the legacy Date class.
text
- String to be parsed to create the date instancepattern
- pattern used to parse the textReturns a LocalDateTime that is seconds
seconds after this date/time.
seconds
- the number of seconds to addReturns a LocalDateTime that is 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 the current system default.