MCPcopy Create free account
hub / github.com/MenoData/Time4J / compareByTime

Method compareByTime

base/src/main/java/net/time4j/PlainDate.java:1647–1667  ·  view source on GitHub ↗
(CalendarDate date)

Source from the content-addressed store, hash-verified

1645 }
1646
1647 @Override
1648 protected int compareByTime(CalendarDate date) {
1649
1650 if (date instanceof PlainDate) { // Optimierung
1651 PlainDate d1 = this;
1652 PlainDate d2 = (PlainDate) date;
1653
1654 int delta = d1.year - d2.year;
1655 if (delta == 0) {
1656 delta = d1.month - d2.month;
1657 if (delta == 0) {
1658 delta = d1.dayOfMonth - d2.dayOfMonth;
1659 }
1660 }
1661
1662 return delta;
1663 }
1664
1665 return super.compareByTime(date); // basiert auf Epochentagen
1666
1667 }
1668
1669 /**
1670 * <p>Liefert die Tage seit der UTC-Epoche. </p>

Callers 2

betweenMethod · 0.95
betweenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected