LocalDateType

final class LocalDateType(date: LocalDate) extends AnyVal

Provides extension methods to java.time.LocalDate

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def +(days: Long): LocalDate

Gets date with specified number of days added.

Gets date with specified number of days added.

Value Params
days

number of days

def +(amount: TemporalAmount): LocalDate

Gets date with specified amount added.

Gets date with specified amount added.

Value Params
amount

temporal amount

def -(days: Long): LocalDate

Gets date with specified number of days subtracted.

Gets date with specified number of days subtracted.

Value Params
days

number of days

def -(amount: TemporalAmount): LocalDate

Gets date with specified amount subtracted.

Gets date with specified amount subtracted.

Value Params
amount

temporal amount

def atEndOfMonth: LocalDate

Gets date adjusted to last day of month.

Gets date adjusted to last day of month.

def atEndOfWeek: LocalDate

Gets date adjusted to last day of week.

Gets date adjusted to last day of week.

Note

Saturday is last day of week.

def atEndOfWeek(lastDay: DayOfWeek): LocalDate

Gets date adjusted to last day of week.

Gets date adjusted to last day of week.

Value Params
lastDay

last day of week

def atEndOfYear: LocalDate

Gets date adjusted to last day of year.

Gets date adjusted to last day of year.

def atStartOfMonth: LocalDate

Gets date adjusted to first day of month.

Gets date adjusted to first day of month.

def atStartOfWeek: LocalDate

Gets date adjusted to first day of week.

Gets date adjusted to first day of week.

Note

Sunday is first day of week.

def atStartOfWeek(firstDay: DayOfWeek): LocalDate

Gets date adjusted to specified first day of week.

Gets date adjusted to specified first day of week.

Value Params
firstDay

first day of week

def atStartOfYear: LocalDate

Gets date adjusted to first day of year.

Gets date adjusted to first day of year.

def iterateTo(end: LocalDate, step: Period): Iterator[LocalDate]

Creates iterator to end date (inclusive).

Creates iterator to end date (inclusive).

Value Params
end

end date

step

period by which to step

Throws
IllegalArgumentException

if step is zero.

def iterateUntil(end: LocalDate, step: Period): Iterator[LocalDate]

Creates iterator to end date (exclusive).

Creates iterator to end date (exclusive).

Value Params
end

end date

step

period by which to step

def max(other: LocalDate): LocalDate

Compares to other date and returns the greater value.

Compares to other date and returns the greater value.

Value Params
other

other date

def min(other: LocalDate): LocalDate

Compares to other date and returns the lesser value.

Compares to other date and returns the lesser value.

Value Params
other

other date

def toYearMonth: YearMonth

Gets YearMonth part of date.

Gets YearMonth part of date.