Uses of Class
java.time.LocalDate
Packages that use LocalDate
Package
Description
Provides the API for accessing and processing data stored in a
data source (usually a relational database) using the
Java programming language.
The main API for dates, times, instants, and durations.
Generic API for calendar systems other than the default ISO.
Access to date and time using fields and units, and date time adjusters.
-
Uses of LocalDate in java.sql
Modifier and TypeMethodDescriptionDate.toLocalDate()Creates aLocalDateinstance using the year, month and day from thisDateobject. -
Uses of LocalDate in java.time
Modifier and TypeFieldDescriptionstatic final LocalDateLocalDate.EPOCHThe epoch yearLocalDate, '1970-01-01'.static final LocalDateLocalDate.MAXThe maximum supportedLocalDate, '+999999999-12-31'.static final LocalDateLocalDate.MINThe minimum supportedLocalDate, '-999999999-01-01'.Modifier and TypeMethodDescriptionYear.atDay(int dayOfYear) Combines this year with a day-of-year to create aLocalDate.YearMonth.atDay(int dayOfMonth) Combines this year-month with a day-of-month to create aLocalDate.YearMonth.atEndOfMonth()Returns aLocalDateat the end of the month.Year.atMonthDay(MonthDay monthDay) Combines this year with a month-day to create aLocalDate.MonthDay.atYear(int year) Combines this month-day with a year to create aLocalDate.static LocalDateLocalDate.from(TemporalAccessor temporal) Obtains an instance ofLocalDatefrom a temporal object.LocalDate.minus(long amountToSubtract, TemporalUnit unit) Returns a copy of this date with the specified amount subtracted.LocalDate.minus(TemporalAmount amountToSubtract) Returns a copy of this date with the specified amount subtracted.LocalDate.minusDays(long daysToSubtract) Returns a copy of thisLocalDatewith the specified number of days subtracted.LocalDate.minusMonths(long monthsToSubtract) Returns a copy of thisLocalDatewith the specified number of months subtracted.LocalDate.minusWeeks(long weeksToSubtract) Returns a copy of thisLocalDatewith the specified number of weeks subtracted.LocalDate.minusYears(long yearsToSubtract) Returns a copy of thisLocalDatewith the specified number of years subtracted.static LocalDateLocalDate.now()Obtains the current date from the system clock in the default time-zone.static LocalDateObtains the current date from the specified clock.static LocalDateObtains the current date from the system clock in the specified time-zone.static LocalDateLocalDate.of(int year, int month, int dayOfMonth) Obtains an instance ofLocalDatefrom a year, month and day.static LocalDateObtains an instance ofLocalDatefrom a year, month and day.static LocalDateLocalDate.ofEpochDay(long epochDay) Obtains an instance ofLocalDatefrom the epoch day count.static LocalDateObtains an instance ofLocalDatefrom anInstantand zone ID.static LocalDateLocalDate.ofYearDay(int year, int dayOfYear) Obtains an instance ofLocalDatefrom a year and day-of-year.static LocalDateLocalDate.parse(CharSequence text) Obtains an instance ofLocalDatefrom a text string such as2007-12-03.static LocalDateLocalDate.parse(CharSequence text, DateTimeFormatter formatter) Obtains an instance ofLocalDatefrom a text string using a specific formatter.LocalDate.plus(long amountToAdd, TemporalUnit unit) Returns a copy of this date with the specified amount added.LocalDate.plus(TemporalAmount amountToAdd) Returns a copy of this date with the specified amount added.LocalDate.plusDays(long daysToAdd) Returns a copy of thisLocalDatewith the specified number of days added.LocalDate.plusMonths(long monthsToAdd) Returns a copy of thisLocalDatewith the specified number of months added.LocalDate.plusWeeks(long weeksToAdd) Returns a copy of thisLocalDatewith the specified number of weeks added.LocalDate.plusYears(long yearsToAdd) Returns a copy of thisLocalDatewith the specified number of years added.LocalDateTime.toLocalDate()Gets theLocalDatepart of this date-time.OffsetDateTime.toLocalDate()Gets theLocalDatepart of this date-time.ZonedDateTime.toLocalDate()Gets theLocalDatepart of this date-time.LocalDate.with(TemporalAdjuster adjuster) Returns an adjusted copy of this date.LocalDate.with(TemporalField field, long newValue) Returns a copy of this date with the specified field set to a new value.LocalDate.withDayOfMonth(int dayOfMonth) Returns a copy of thisLocalDatewith the day-of-month altered.LocalDate.withDayOfYear(int dayOfYear) Returns a copy of thisLocalDatewith the day-of-year altered.LocalDate.withMonth(int month) Returns a copy of thisLocalDatewith the month-of-year altered.LocalDate.withYear(int year) Returns a copy of thisLocalDatewith the year altered.Modifier and TypeMethodDescriptionLocalDate.datesUntil(LocalDate endExclusive) Returns a sequential ordered stream of dates.LocalDate.datesUntil(LocalDate endExclusive, Period step) Returns a sequential ordered stream of dates by given incremental step.Modifier and TypeMethodDescriptionCombines this time with a date to create aLocalDateTime.Combines this time with a date to create anOffsetDateTime.static PeriodObtains aPeriodconsisting of the number of years, months, and days between two dates.LocalDate.datesUntil(LocalDate endExclusive) Returns a sequential ordered stream of dates.LocalDate.datesUntil(LocalDate endExclusive, Period step) Returns a sequential ordered stream of dates by given incremental step.static LocalDateTimeObtains an instance ofLocalDateTimefrom a date and time.static OffsetDateTimeOffsetDateTime.of(LocalDate date, LocalTime time, ZoneOffset offset) Obtains an instance ofOffsetDateTimefrom a date, time and offset.static ZonedDateTimeObtains an instance ofZonedDateTimefrom a local date and time.longLocalTime.toEpochSecond(LocalDate date, ZoneOffset offset) Converts thisLocalTimeto the number of seconds since the epoch of 1970-01-01T00:00:00Z.longOffsetTime.toEpochSecond(LocalDate date) Converts thisOffsetTimeto the number of seconds since the epoch of 1970-01-01T00:00:00Z. -
Uses of LocalDate in java.time.chrono
Methods in java.time.chrono that return LocalDateModifier and TypeMethodDescriptionIsoChronology.date(int prolepticYear, int month, int dayOfMonth) Obtains an ISO local date from the proleptic-year, month-of-year and day-of-month fields.Obtains an ISO local date from the era, year-of-era, month-of-year and day-of-month fields.IsoChronology.date(TemporalAccessor temporal) Obtains an ISO local date from another date-time object.IsoChronology.dateEpochDay(long epochDay) Obtains an ISO local date from the epoch-day.IsoChronology.dateNow()Obtains the current ISO local date from the system clock in the default time-zone.Obtains the current ISO local date from the specified clock.Obtains the current ISO local date from the system clock in the specified time-zone.IsoChronology.dateYearDay(int prolepticYear, int dayOfYear) Obtains an ISO local date from the proleptic-year and day-of-year fields.IsoChronology.dateYearDay(Era era, int yearOfEra, int dayOfYear) Obtains an ISO local date from the era, year-of-era and day-of-year fields.IsoChronology.resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) Resolves parsedChronoFieldvalues into a date during parsing. -
Uses of LocalDate in java.time.temporal
Methods in java.time.temporal that return types with arguments of type LocalDateModifier and TypeMethodDescriptionstatic TemporalQuery<LocalDate>TemporalQueries.localDate()A query forLocalDatereturning null if not found.Method parameters in java.time.temporal with type arguments of type LocalDateModifier and TypeMethodDescriptionstatic TemporalAdjusterTemporalAdjusters.ofDateAdjuster(UnaryOperator<LocalDate> dateBasedAdjuster) Obtains aTemporalAdjusterthat wraps a date adjuster.