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.java312 …long totalMonths = (end.prolepticYear - this.prolepticYear) * 13 + (end.month - this.month); // s… in until() local
314 if (totalMonths > 0 && days < 0) { in until()
315 totalMonths--; in until()
316 CopticDate calcDate = this.plusMonths(totalMonths); in until()
318 } else if (totalMonths < 0 && days > 0) { in until()
319 totalMonths++; in until()
322 long years = totalMonths / 13; // safe in until()
323 int months = (int) (totalMonths % 13); // safe in until()
/libcore/ojluni/src/main/java/java/time/
DPeriod.java828 long totalMonths = toTotalMonths(); in normalized() local
829 long splitYears = totalMonths / 12; in normalized()
830 int splitMonths = (int) (totalMonths % 12); // no overflow in normalized()
894 long totalMonths = toTotalMonths(); in addTo() local
895 if (totalMonths != 0) { in addTo()
896 temporal = temporal.plus(totalMonths, MONTHS); in addTo()
947 long totalMonths = toTotalMonths(); in subtractFrom() local
948 if (totalMonths != 0) { in subtractFrom()
949 temporal = temporal.minus(totalMonths, MONTHS); in subtractFrom()
DLocalDate.java1658 long totalMonths = end.getProlepticMonth() - this.getProlepticMonth(); // safe in until() local
1660 if (totalMonths > 0 && days < 0) { in until()
1661 totalMonths--; in until()
1662 LocalDate calcDate = this.plusMonths(totalMonths); in until()
1664 } else if (totalMonths < 0 && days > 0) { in until()
1665 totalMonths++; in until()
1668 long years = totalMonths / 12; // safe in until()
1669 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.java231 long totalMonths = years * monthRange + months; in normalized() local
232 long splitYears = totalMonths / monthRange; in normalized()
233 int splitMonths = (int) (totalMonths % monthRange); // no overflow in normalized()