Package: java.time

## [Java] Class LocalDate

- java.time.LocalDate

-     public class LocalDate
      extends Object

  GDK enhancements for LocalDate.

  displayName:
    LocalDate
  receiverFqcn:
    java.time.LocalDate

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public String` | `format(String pattern)` Formats this date with the provided DateTimeFormatter pattern.
    `` | `public String` | `format(FormatStyle dateStyle)` Formats this date in the provided, localized FormatStyle.
    `` | `public String` | `getDateString()` Formats this date with the DateTimeFormatter.ISO_LOCAL_DATE formatter.
    `` | `public LocalDateTime` | `leftShift(LocalTime time)` Returns a LocalDateTime from this date and the provided LocalTime.
    `` | `public OffsetDateTime` | `leftShift(OffsetTime time)` Returns a OffsetDateTime from this date and the provided OffsetTime.
    `` | `public LocalDate` | `minus(long days)` Returns a LocalDate that is `days` days before this date.
    `` | `public long` | `minus(LocalDate other)` Calculates the number of days between two dates
    `` | `public LocalDate` | `next()` Returns a LocalDate one day after this date.
    `` | `public static LocalDate` | `parse(LocalDate type, CharSequence text, String pattern)` Parse text into a LocalDate using the provided pattern.
    `` | `public LocalDate` | `plus(long days)` Returns a LocalDate that is `days` days after this date.
    `` | `public LocalDate` | `previous()` Returns a LocalDate one day before this date.
    `` | `public Period` | `rightShift(LocalDate other)` Returns a Period equivalent to the time between this date (inclusive) and the provided LocalDate (exclusive).
    `` | `public Calendar` | `toCalendar()` Returns an equivalent instance of Calendar.
    `` | `public Date` | `toDate()` Returns an equivalent instance of Date.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `addShutdownHook, any, any, asBoolean, asType, clamp, clamp, 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, takeIf, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits`

- - ### Method Detail

    - #### public String format(String pattern)

      Formats this date with the provided DateTimeFormatter pattern.

      Parameters:
        `pattern` - the formatting pattern
      Returns:
        a formatted String
      See Also:
        DateTimeFormatter
      Since:
        2.5.0

    - #### public String format(FormatStyle dateStyle)

      Formats this date in the provided, localized FormatStyle.

      Parameters:
        `dateStyle` - the FormatStyle
      Returns:
        a formatted String
      See Also:
        DateTimeFormatter
      Since:
        2.5.0

    - #### public String getDateString()

      Formats this date with the DateTimeFormatter.ISO_LOCAL_DATE formatter.

      Returns:
        a formatted String
      See Also:
        DateTimeFormatter
      Since:
        2.5.0

    - #### public LocalDateTime leftShift(LocalTime time)

      Returns a LocalDateTime from this date and the provided LocalTime.

      Parameters:
        `time` - a LocalTime
      Returns:
        a LocalDateTime
      Since:
        2.5.0

    - #### public OffsetDateTime leftShift(OffsetTime time)

      Returns a OffsetDateTime from this date and the provided OffsetTime.

      Parameters:
        `time` - an OffsetTime
      Returns:
        an OffsetDateTime
      Since:
        2.5.0

    - #### public LocalDate minus(long days)

      Returns a LocalDate that is `days` days before this date.

      Parameters:
        `days` - the number of days to subtract
      Returns:
        a LocalDate
      Since:
        2.5.0

    - #### public long minus(LocalDate other)

      Calculates the number of days between two dates

      Parameters:
        `other` - the other LocalDate
      Returns:
        the number of days
      Since:
        3.0.0

    - #### public LocalDate next()

      Returns a LocalDate one day after this date.

      Returns:
        the next day
      Since:
        2.5.0

    - #### public static LocalDate parse(LocalDate type, CharSequence text, String pattern)

      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.

      throws:
        java.lang.IllegalArgumentException if the pattern is invalid
      throws:
        java.time.format.DateTimeParseException if the text cannot be parsed
      Parameters:
        `type` - placeholder variable used by Groovy categories; ignored for default static methods
        `text` - String to be parsed to create the date instance
        `pattern` - pattern used to parse the text
      Returns:
        a LocalDate representing the parsed text
      See Also:
        DateTimeFormatter
        LocalDate.parse
      Since:
        2.5.0

    - #### public LocalDate plus(long days)

      Returns a LocalDate that is `days` days after this date.

      Parameters:
        `days` - the number of days to add
      Returns:
        a LocalDate
      Since:
        2.5.0

    - #### public LocalDate previous()

      Returns a LocalDate one day before this date.

      Returns:
        the previous day
      Since:
        2.5.0

    - #### public Period rightShift(LocalDate other)

      Returns a Period equivalent to the time between this date (inclusive) and the provided LocalDate (exclusive).

      Parameters:
        `other` - another LocalDate
      Returns:
        a Period representing the time between the two LocalDates
      Since:
        2.5.0

    - #### public Calendar toCalendar()

      Returns an equivalent instance of Calendar. The time portion of the returned calendar is cleared and the time zone is the current system default.

      Returns:
        a java.util.Calendar
      Since:
        2.5.0

    - #### public Date toDate()

      Returns an equivalent instance of Date. The time portion of the returned date is cleared.

      Returns:
        a java.util.Date
      Since:
        2.5.0