adjust method

OffsetDate adjust(
  1. LocalDate adjuster(
    1. LocalDate
    )
)

Returns this offset date, with the given date adjuster applied to it, maintaining the existing offset.

If the adjuster attempts to construct an invalid date (such as by trying to set a day-of-month of 30 in February), any exception thrown by that construction attempt will be propagated through this method.

  • adjuster: The adjuster to apply.

Returns: The adjusted offset date.

Implementation

OffsetDate adjust(LocalDate Function(LocalDate) adjuster) =>
    OffsetDate(calendarDate.adjust(adjuster), offset);