LocalDate
LocalDate Class
LocalDate Classvar localdate = LocalDate.of(2023, 10, 24); // LDATE 2023-10-24Static Methods
now()
now()var currentDate = LocalDate.now();
parse(text: String)
parse(text: String)var parsedDate = LocalDate.parse("2023-10-24");
of(year: Integer, month: Integer, dayOfMonth: Integer)
of(year: Integer, month: Integer, dayOfMonth: Integer)var customDate = LocalDate.of(2023, 10, 24);
ofYearDay(year: Integer, dayOfYear: Integer)
ofYearDay(year: Integer, dayOfYear: Integer)ofEpochDay(epochDay: Long)
ofEpochDay(epochDay: Long)Getter Methods
getYear()
getYear()getMonthValue()
getMonthValue()getDayOfMonth()
getDayOfMonth()getDayOfYear()
getDayOfYear()Date Manipulation Methods
minusYears(yearsToSubtract: Long)
minusYears(yearsToSubtract: Long)minusMonths(monthsToSubtract: Long)
minusMonths(monthsToSubtract: Long)minusWeeks(weeksToSubtract: Long)
minusWeeks(weeksToSubtract: Long)minusDays(daysToSubtract: Long)
minusDays(daysToSubtract: Long)plusDays(daysToAdd: Long)
plusDays(daysToAdd: Long)daysUntil(endDate: LocalDate)
daysUntil(endDate: LocalDate)monthsUntil(endDate: LocalDate)
monthsUntil(endDate: LocalDate)toEpochDay()
toEpochDay()Comparison Methods
isBefore(other: LocalDate)
isBefore(other: LocalDate)isAfter(other: LocalDate)
isAfter(other: LocalDate)Date-Time Combination Methods
atStartOfDay()
atStartOfDay()atTime(time: LocalTime)
atTime(time: LocalTime)atTime(hour: Integer, minute: Integer, second: Integer)
atTime(hour: Integer, minute: Integer, second: Integer)