adjustDate method

OffsetDateTime adjustDate(
  1. LocalDate adjuster(
    1. LocalDate
    )
)

Returns this offset date/time, with the given date adjuster applied to it, maintaining the existing time of day and 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/time.

Implementation

OffsetDateTime adjustDate(LocalDate Function(LocalDate) adjuster) {
  return OffsetDateTime(localDateTime.adjustDate(adjuster), offset);
}