LocalDate (Java Platform SE 8 )

Modifier and Type
Method and Description

Temporal
adjustIntoTemporal temporal)

Adjusts the specified temporal object to have the same date as this object.

LocalDateTime
atStartOfDay

Combines this date with the time of midnight to create a LocalDateTime
at the start of this date.

ZonedDateTime
atStartOfDayZoneId zone)

Returns a zoned date-time from this date at the earliest valid time according
to the rules in the time-zone.

LocalDateTime
atTime

Combines this date with a time to create a LocalDateTime.

LocalDateTime
atTime

Combines this date with a time to create a LocalDateTime.

LocalDateTime
atTime

Combines this date with a time to create a LocalDateTime.

LocalDateTime
atTimeLocalTime time)

Combines this date with a time to create a LocalDateTime.

OffsetDateTime
atTimeOffsetTime time)

Combines this date with an offset time to create an OffsetDateTime.

int
compareToChronoLocalDate other)

Compares this date to another date.

boolean
equalsObject obj)

Checks if this date is equal to another date.

String
formatDateTimeFormatter formatter)

Formats this date using the specified formatter.

static LocalDate
fromTemporalAccessor temporal)

Obtains an instance of LocalDate from a temporal object.

int
getTemporalField field)

Gets the value of the specified field from this date as an int.

IsoChronology
getChronology

Gets the chronology of this date, which is the ISO calendar system.

int
getDayOfMonth

Gets the day-of-month field.

DayOfWeek
getDayOfWeek

Gets the day-of-week field, which is an enum DayOfWeek.

int
getDayOfYear

Gets the day-of-year field.

Era
getEra

Gets the era applicable at this date.

long
getLongTemporalField field)

Gets the value of the specified field from this date as a long.

Month
getMonth

Gets the month-of-year field using the Month enum.

int
getMonthValue

Gets the month-of-year field from 1 to 12.

int
getYear

Gets the year field.

int
hashCode

A hash code for this date.

boolean
isAfterChronoLocalDate other)

Checks if this date is after the specified date.

boolean
isBeforeChronoLocalDate other)

Checks if this date is before the specified date.

boolean
isEqualChronoLocalDate other)

Checks if this date is equal to the specified date.

boolean
isLeapYear

Checks if the year is a leap year, according to the ISO proleptic
calendar system rules.

boolean
isSupportedTemporalField field)

Checks if the specified field is supported.

boolean
isSupportedTemporalUnit unit)

Checks if the specified unit is supported.

int
lengthOfMonth

Returns the length of the month represented by this date.

int
lengthOfYear

Returns the length of the year represented by this date.

LocalDate
minusTemporalUnit unit)

Returns a copy of this date with the specified amount subtracted.

LocalDate
minusTemporalAmount amountToSubtract)

Returns a copy of this date with the specified amount subtracted.

LocalDate
minusDays

Returns a copy of this LocalDate with the specified number of days subtracted.

LocalDate
minusMonths

Returns a copy of this LocalDate with the specified number of months subtracted.

LocalDate
minusWeeks

Returns a copy of this LocalDate with the specified number of weeks subtracted.

LocalDate
minusYears

Returns a copy of this LocalDate with the specified number of years subtracted.

static LocalDate
now

Obtains the current date from the system clock in the default time-zone.

static LocalDate
nowClock clock)

Obtains the current date from the specified clock.

static LocalDate
nowZoneId zone)

Obtains the current date from the system clock in the specified time-zone.

static LocalDate
of

Obtains an instance of LocalDate from a year, month and day.

static LocalDate
ofMonth month,
int dayOfMonth)

Obtains an instance of LocalDate from a year, month and day.

static LocalDate
ofEpochDay

Obtains an instance of LocalDate from the epoch day count.

static LocalDate
ofYearDay

Obtains an instance of LocalDate from a year and day-of-year.

static LocalDate
parseCharSequence text)

Obtains an instance of LocalDate from a text string such as 2007-12-03.

static LocalDate
parseCharSequence text,
DateTimeFormatter formatter)

Obtains an instance of LocalDate from a text string using a specific formatter.

LocalDate
plusTemporalUnit unit)

Returns a copy of this date with the specified amount added.

LocalDate
plusTemporalAmount amountToAdd)

Returns a copy of this date with the specified amount added.

LocalDate
plusDays

Returns a copy of this LocalDate with the specified number of days added.

LocalDate
plusMonths

Returns a copy of this LocalDate with the specified number of months added.

LocalDate
plusWeeks

Returns a copy of this LocalDate with the specified number of weeks added.

LocalDate
plusYears

Returns a copy of this LocalDate with the specified number of years added.

<R> R
queryTemporalQuery<R> query)

Queries this date using the specified query.

ValueRange
rangeTemporalField field)

Gets the range of valid values for the specified field.

long
toEpochDay

Converts this date to the Epoch Day.

String
toString

Outputs this date as a String, such as 2007-12-03.

Period
untilChronoLocalDate endDateExclusive)

Calculates the period between this date and another date as a Period.

long
untilTemporal endExclusive,
TemporalUnit unit)

Calculates the amount of time until another date in terms of the specified unit.

LocalDate
withTemporalAdjuster adjuster)

Returns an adjusted copy of this date.

LocalDate
withTemporalField field,
long newValue)

Returns a copy of this date with the specified field set to a new value.

LocalDate
withDayOfMonth

Returns a copy of this LocalDate with the day-of-month altered.

LocalDate
withDayOfYear

Returns a copy of this LocalDate with the day-of-year altered.

LocalDate
withMonth

Returns a copy of this LocalDate with the month-of-year altered.

LocalDate
withYear

Returns a copy of this LocalDate with the year altered.