@Test public void getPrevious() throws Exception { DateTimePeriod period0 = DateTimePeriod.createDay(2009, 1, 1, DateTimeZone.UTC); DateTimePeriod period1 = period0.getPrevious(); DateTime correctStart = new DateTime(2008,12,31,0,0,0,0,DateTimeZone.UTC); DateTime correctEnd = new DateTime(2009,1,1,0,0,0,0,DateTimeZone.UTC); Assert.assertEquals(correctStart, period1.getStart()); Assert.assertEquals(correctEnd, period1.getEnd()); }
@Override public DateTimePeriod getPrevious() { DateTime previous = getStart().minusDays(1); return DateTimePeriod.createDay(previous); }
DateTimeDay extends DateTimePeriod { @Override public DateTimePeriod getPrevious() { DateTime previous = getStart().minusDays(1); return DateTimePeriod.createDay(previous); } }
DateTimeDay extends DateTimePeriod { @Override public DateTimePeriod getPrevious() { DateTime previous = getStart().minusDays(1); return DateTimePeriod.createDay(previous); } protected  DateTimeDay(DateTime start, DateTime end); }
DateTimeDay extends DateTimePeriod { @Override public DateTimePeriod getPrevious() { DateTime previous = getStart().minusDays(1); return DateTimePeriod.createDay(previous); } protected  DateTimeDay(DateTime start, DateTime end); @Override DateTimePeriod getNext(); @Override DateTimePeriod getPrevious(); @Override DateTimeDuration getDefaultSubDuration(); }
DateTimeDay extends DateTimePeriod { @Override public DateTimePeriod getPrevious() { DateTime previous = getStart().minusDays(1); return DateTimePeriod.createDay(previous); } protected  DateTimeDay(DateTime start, DateTime end); @Override DateTimePeriod getNext(); @Override DateTimePeriod getPrevious(); @Override DateTimeDuration getDefaultSubDuration();  }