Returns a copy of this ZonedDateTime with the day-of-year replaced with the provided 'dayOfYear'
package com.logicbig.example.zoneddatetime;
import java.time.ZonedDateTime;
public class WithDayOfYearExample {
public static void main(String... args) {
ZonedDateTime d = ZonedDateTime.now();
System.out.println(d);
ZonedDateTime d2 = d.withDayOfYear(200);
System.out.println(d2);
}
}
Output
2017-05-01T16:00:22.093-05:00[America/Chicago]
2017-07-19T16:00:22.093-05:00[America/Chicago]