Return type | Name and parameters |
---|---|
String
|
format(String pattern)
Formats this date with the provided DateTimeFormatter pattern. |
String
|
format(FormatStyle dateStyle)
Formats this date in the provided, localized FormatStyle. |
String
|
getDateString()
Formats this date with the DateTimeFormatter#ISO_LOCAL_DATE formatter. |
LocalDateTime
|
leftShift(LocalTime time)
Returns a LocalDateTime from this date and the provided LocalTime. |
OffsetDateTime
|
leftShift(OffsetTime time)
Returns a OffsetDateTime from this date and the provided OffsetTime. |
long
|
minus(LocalDate other)
Calculates the number of days between two dates |
LocalDate
|
minus(long days)
Returns a LocalDate that is days days before this date.
|
LocalDate
|
next()
Returns a LocalDate one day after this date. |
LocalDate
|
parse(CharSequence text, String pattern)
Parse text into a LocalDate using the provided pattern. |
LocalDate
|
plus(long days)
Returns a LocalDate that is days days after this date.
|
LocalDate
|
previous()
Returns a LocalDate one day before this date. |
Period
|
rightShift(LocalDate other)
Returns a Period equivalent to the time between this date (inclusive) and the provided LocalDate (exclusive). |
Calendar
|
toCalendar()
Returns an equivalent instance of Calendar. |
Date
|
toDate()
Returns an 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
, 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
Formats this date with the provided DateTimeFormatter pattern.
pattern
- the formatting patternFormats this date in the provided, localized FormatStyle.
dateStyle
- the FormatStyleFormats this date with the DateTimeFormatter#ISO_LOCAL_DATE formatter.
Returns a LocalDateTime from this date and the provided LocalTime.
time
- a LocalTimeReturns a OffsetDateTime from this date and the provided OffsetTime.
time
- an OffsetTimeCalculates the number of days between two dates
other
- the other LocalDateReturns a LocalDate that is days
days before this date.
days
- the number of days to subtractReturns a LocalDate one day after this date.
Parse text into a LocalDate 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 LocalDate that is days
days after this date.
days
- the number of days to addReturns a LocalDate one day before this date.
Returns a Period equivalent to the time between this date (inclusive) and the provided LocalDate (exclusive).
other
- another LocalDateReturns an equivalent instance of Calendar. The time portion of the returned calendar is cleared and the time zone is the current system default.