4142434445464748495051
from = at.clone(); from.setYear(i); from.computeDayOfMonth(); if (from.compareTo(zonePeriod.getFrom()) < 0) { continue; } if (from.compareTo(zonePeriod.getTo()) > 0) { continue;
4546474849505152535455
if (from.compareTo(zonePeriod.getFrom()) < 0) { continue; } if (from.compareTo(zonePeriod.getTo()) > 0) { continue; } period.setFrom(from); period.setPeriodName(String.format(zonePeriod.getFormat(), format));
3031323334353637383940
dt2.setMinute(00); dt2.setSecond(00); dt2.setType(DateTime.Type.UTC); assertEquals(1, dt1.compareTo(dt2)); assertEquals(-1, dt2.compareTo(dt1)); dt2.setYear(2009); dt2.setMonth(8); assertEquals(1, dt1.compareTo(dt2));
3637383940414243444546
dt2.setYear(2009); dt2.setMonth(8); assertEquals(1, dt1.compareTo(dt2)); assertEquals(-1, dt2.compareTo(dt1)); dt2.setMonth(9); assertEquals(0, dt1.compareTo(dt2)); assertEquals(0, dt2.compareTo(dt1));
assertEquals(-1, dt2.compareTo(dt1)); dt2.setMonth(9); assertEquals(0, dt1.compareTo(dt2)); assertEquals(0, dt2.compareTo(dt1)); try { dt1.compareTo(null); fail("Expected ClassCastException"); } catch (ClassCastException ex) {