Home
last modified time | relevance | path

Searched refs:totalMonths (Results 1 – 5 of 5) sorted by relevance

/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticDate.java313 …long totalMonths = (end.prolepticYear - this.prolepticYear) * 13 + (end.month - this.month); // s… in until() local
315 if (totalMonths > 0 && days < 0) { in until()
316 totalMonths--; in until()
317 CopticDate calcDate = this.plusMonths(totalMonths); in until()
319 } else if (totalMonths < 0 && days > 0) { in until()
320 totalMonths++; in until()
323 long years = totalMonths / 13; // safe in until()
324 int months = (int) (totalMonths % 13); // safe in until()
/libcore/ojluni/src/main/java/java/time/
DPeriod.java830 long totalMonths = toTotalMonths(); in normalized() local
831 long splitYears = totalMonths / 12; in normalized()
832 int splitMonths = (int) (totalMonths % 12); // no overflow in normalized()
896 long totalMonths = toTotalMonths(); in addTo() local
897 if (totalMonths != 0) { in addTo()
898 temporal = temporal.plus(totalMonths, MONTHS); in addTo()
949 long totalMonths = toTotalMonths(); in subtractFrom() local
950 if (totalMonths != 0) { in subtractFrom()
951 temporal = temporal.minus(totalMonths, MONTHS); in subtractFrom()
DLocalDate.java1700 long totalMonths = end.getProlepticMonth() - this.getProlepticMonth(); // safe in until() local
1702 if (totalMonths > 0 && days < 0) { in until()
1703 totalMonths--; in until()
1704 LocalDate calcDate = this.plusMonths(totalMonths); in until()
1706 } else if (totalMonths < 0 && days > 0) { in until()
1707 totalMonths++; in until()
1710 long years = totalMonths / 12; // safe in until()
1711 int months = (int) (totalMonths % 12); // safe in until()
/libcore/ojluni/src/main/java/java/time/chrono/
DHijrahDate.java590 …long totalMonths = (end.prolepticYear - this.prolepticYear) * 12 + (end.monthOfYear - this.monthOf… in until() local
592 if (totalMonths > 0 && days < 0) { in until()
593 totalMonths--; in until()
594 HijrahDate calcDate = this.plusMonths(totalMonths); in until()
596 } else if (totalMonths < 0 && days > 0) { in until()
597 totalMonths++; in until()
600 long years = totalMonths / 12; // safe in until()
601 int months = (int) (totalMonths % 12); // safe in until()
DChronoPeriodImpl.java229 long totalMonths = years * monthRange + months; in normalized() local
230 long splitYears = totalMonths / monthRange; in normalized()
231 int splitMonths = (int) (totalMonths % monthRange); // no overflow in normalized()