LocalDate (Java SE 25 & JDK 25)
- All Implemented Interfaces:
Serializable, Comparable<ChronoLocalDate>, ChronoLocalDate, Temporal, TemporalAccessor, TemporalAdjuster
-
Field Summary
Fields
The epoch year
LocalDate, '1970-01-01'.The maximum supported
LocalDate, '+999999999-12-31'.The minimum supported
LocalDate, '-999999999-01-01'. -
Method Summary
Adjusts the specified temporal object to have the same date as this object.
Combines this date with the time of midnight to create a
LocalDateTimeat the start of this date.Returns a zoned date-time from this date at the earliest valid time according to the rules in the time-zone.
atTime(int hour, int minute) Combines this date with a time to create a
LocalDateTime.atTime(int hour, int minute, int second) Combines this date with a time to create a
LocalDateTime.atTime(int hour, int minute, int second, int nanoOfSecond) Combines this date with a time to create a
LocalDateTime.Combines this date with a time to create a
LocalDateTime.Combines this date with an offset time to create an
OffsetDateTime.intCompares this date to another date.
Returns a sequential ordered stream of dates.
Returns a sequential ordered stream of dates by given incremental step.
booleanChecks if this date is equal to another date.
Formats this date using the specified formatter.
Obtains an instance of
LocalDatefrom a temporal object.intGets the value of the specified field from this date as an
int.Gets the chronology of this date, which is the ISO calendar system.
intGets the day-of-month field.
Gets the day-of-week field, which is an enum
DayOfWeek.intGets the day-of-year field.
getEra()Gets the era applicable at this date.
longGets the value of the specified field from this date as a
long.getMonth()Gets the month-of-year field using the
Monthenum.intGets the month-of-year field from 1 to 12.
intgetYear()inthashCode()A hash code for this date.
booleanChecks if this date is after the specified date.
booleanChecks if this date is before the specified date.
booleanChecks if this date is equal to the specified date.
booleanChecks if the year is a leap year, according to the ISO proleptic calendar system rules.
booleanChecks if the specified field is supported.
booleanChecks if the specified unit is supported.
intReturns the length of the month represented by this date.
intReturns the length of the year represented by this date.
Returns a copy of this date with the specified amount subtracted.
Returns a copy of this date with the specified amount subtracted.
minusDays(long daysToSubtract) Returns a copy of this
LocalDatewith the specified number of days subtracted.minusMonths(long monthsToSubtract) Returns a copy of this
LocalDatewith the specified number of months subtracted.minusWeeks(long weeksToSubtract) Returns a copy of this
LocalDatewith the specified number of weeks subtracted.minusYears(long yearsToSubtract) Returns a copy of this
LocalDatewith the specified number of years subtracted.now()Obtains the current date from the system clock in the default time-zone.
Obtains the current date from the specified clock.
Obtains the current date from the system clock in the specified time-zone.
of(int year, int month, int dayOfMonth) Obtains an instance of
LocalDatefrom a year, month and day.of(int year, Month month, int dayOfMonth) Obtains an instance of
LocalDatefrom a year, month and day.ofEpochDay(long epochDay) Obtains an instance of
LocalDatefrom the epoch day count.Obtains an instance of
LocalDatefrom anInstantand zone ID.ofYearDay(int year, int dayOfYear) Obtains an instance of
LocalDatefrom a year and day-of-year.Obtains an instance of
LocalDatefrom a text string such as2007-12-03.Obtains an instance of
LocalDatefrom a text string using a specific formatter.Returns a copy of this date with the specified amount added.
Returns a copy of this date with the specified amount added.
plusDays(long daysToAdd) Returns a copy of this
LocalDatewith the specified number of days added.plusMonths(long monthsToAdd) Returns a copy of this
LocalDatewith the specified number of months added.plusWeeks(long weeksToAdd) Returns a copy of this
LocalDatewith the specified number of weeks added.plusYears(long yearsToAdd) Returns a copy of this
LocalDatewith the specified number of years added.<R> RQueries this date using the specified query.
Gets the range of valid values for the specified field.
longConverts this
LocalDateto the number of seconds since the epoch of 1970-01-01T00:00:00Z.toString()Outputs this date as a
String, such as2007-12-03.Calculates the period between this date and another date as a
Period.longCalculates the amount of time until another date in terms of the specified unit.
Returns an adjusted copy of this date.
Returns a copy of this date with the specified field set to a new value.
withDayOfMonth(int dayOfMonth) Returns a copy of this
LocalDatewith the day-of-month altered.withDayOfYear(int dayOfYear) Returns a copy of this
LocalDatewith the day-of-year altered.withMonth(int month) Returns a copy of this
LocalDatewith the month-of-year altered.withYear(int year) Returns a copy of this
LocalDatewith the year altered.
-
Field Details
-
MIN
-
MAX
-
EPOCH
-
-
Method Details
-
now
-
now
-
now
-
of
-
of
-
ofYearDay
-
ofInstant
-
ofEpochDay
-
from
-
parse
-
parse
-
isSupported
-
isSupported
-
range
-
get
-
getLong
-
getChronology
-
getEra
-
getYear
-
getMonthValue
-
getMonth
-
getDayOfMonth
-
getDayOfYear
-
getDayOfWeek
-
isLeapYear
-
lengthOfMonth
-
lengthOfYear
-
with
-
with
-
withYear
-
withMonth
-
withDayOfMonth
-
withDayOfYear
-
plus
-
plus
-
plusYears
-
plusMonths
-
plusWeeks
-
plusDays
-
minus
-
minus
-
minusYears
-
minusMonths
-
minusWeeks
-
minusDays
-
query
-
adjustInto
-
until
-
until
-
datesUntil
-
datesUntil
-
format
-
atTime
-
atTime
-
atTime
-
atTime
-
atTime
-
atStartOfDay
-
atStartOfDay
-
toEpochSecond
-
compareTo
-
isAfter
-
isBefore
-
isEqual
-
equals
-
hashCode
-
toString
-