Day implements IPeriod, Comparable<Day> { @Override public int compareTo(final Day o) { return Integer.compare(day_, o.day_); } Day(final Date d);   Day(final int day);  Day(final int year, final Month month, final int day); static int getMonthDays(int month); static int getCumulatedMonthDays(int month); static int calc(int year, final int month, final int day); static int calcDays(int year, final int ndays); static int subtract(final Day d0, final Day d1); static Day toDay(); static int getNumberOfDaysByMonth(final int year, final int month); static boolean isLeap(final int year); @Override int compareTo(final Day o); @Override boolean contains(final Date dt); int difference(final Day d1); @Override boolean equals(Object obj); @Override int hashCode(); @Override Day firstday(); DayOfWeek getDayOfWeek(); int getId(); int getMonth(); int getYear(); boolean isAfter(final Day d1); boolean isBefore(final Day d1); boolean isNotAfter(final Day d1); boolean isNotBefore(final Day d1); boolean isWorkingDay(); @Override Day lastday(); Day minus(final int ndays); Day plus(final int ndays); @NewObject Date getTime(); long getTimeInMillis(); @NewObject GregorianCalendar toCalendar(); @Override String toString(); static Day fromString(String s); static final int DAY_OF_WEEK_T0; static final Day BEG; static final Day END; }
@Test public void testCompareTo() { assertTrue(D_2001_01_03.compareTo(D_2001_01_03) == 0); assertTrue(D_2001_03_03.compareTo(D_2001_01_03) > 0); assertTrue(D_2001_01_03.compareTo(D_2001_03_03) < 0); }