src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java
Print this page
*** 72,82 ****
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
import java.time.ZoneOffset;
! import java.time.temporal.ISOChrono;
import java.util.Objects;
/**
* A rule expressing how to create a transition.
* <p>
--- 72,82 ----
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.Month;
import java.time.ZoneOffset;
! import java.time.chrono.IsoChronology;
import java.util.Objects;
/**
* A rule expressing how to create a transition.
* <p>
*** 428,438 ****
* @return the transition instance, not null
*/
public ZoneOffsetTransition createTransition(int year) {
LocalDate date;
if (dom < 0) {
! date = LocalDate.of(year, month, month.length(ISOChrono.INSTANCE.isLeapYear(year)) + 1 + dom);
if (dow != null) {
date = date.with(previousOrSame(dow));
}
} else {
date = LocalDate.of(year, month, dom);
--- 428,438 ----
* @return the transition instance, not null
*/
public ZoneOffsetTransition createTransition(int year) {
LocalDate date;
if (dom < 0) {
! date = LocalDate.of(year, month, month.length(IsoChronology.INSTANCE.isLeapYear(year)) + 1 + dom);
if (dow != null) {
date = date.with(previousOrSame(dow));
}
} else {
date = LocalDate.of(year, month, dom);