Returns a copy of this {@code ZonedDateTime} with the day-of-month altered.
!(p)
This operates on the local time-line,
{@link LocalDateTime#withDayOfMonth(int) changing the day-of-month} of the local date-time.
This is then converted back to a {@code ZonedDateTime}, using the zone ID
to obtain the offset.
!(p)
When converting back to {@code ZonedDateTime}, if the local date-time is _in an overlap,
then the offset will be retained if possible, otherwise the earlier offset will be used.
If _in a gap, the local date-time will be adjusted forward by the length of the gap.
!(p)
This instance is immutable and unaffected by this method call.
@param dayOfMonth the day-of-month to set _in the result, from 1 to 28-31
@return a {@code ZonedDateTime} based on this date-time with the requested day, not null
@throws DateTimeException if the day-of-month value is invalid,
or if the day-of-month is invalid for the month-year
Returns a copy of this {@code ZonedDateTime} with the day-of-month altered. !(p) This operates on the local time-line, {@link LocalDateTime#withDayOfMonth(int) changing the day-of-month} of the local date-time. This is then converted back to a {@code ZonedDateTime}, using the zone ID to obtain the offset. !(p) When converting back to {@code ZonedDateTime}, if the local date-time is _in an overlap, then the offset will be retained if possible, otherwise the earlier offset will be used. If _in a gap, the local date-time will be adjusted forward by the length of the gap. !(p) This instance is immutable and unaffected by this method call.
@param dayOfMonth the day-of-month to set _in the result, from 1 to 28-31 @return a {@code ZonedDateTime} based on this date-time with the requested day, not null @throws DateTimeException if the day-of-month value is invalid, or if the day-of-month is invalid for the month-year