@Override public List<Period> generatePeriods(DateTimeUnit dateTimeUnit){
  dateTimeUnit.setMonth(1);
  dateTimeUnit.setDay(1);
  List<Period> periods=Lists.newArrayList();
  int year=dateTimeUnit.getYear();
  Calendar calendar=getCalendar();
  while (year == dateTimeUnit.getYear()) {
    periods.add(createPeriod(dateTimeUnit,null));
    dateTimeUnit=calendar.plusDays(dateTimeUnit,1);
  }
  return periods;
}

@ Override public List < Period > generatePeriods ( DateTimeUnit dateTimeUnit ) { dateTimeUnit . setMonth ( 1 ) ; dateTimeUnit . setDay ( 1 ) ; List < Period > periods = Lists . newArrayList ( ) ; int year = dateTimeUnit . getYear ( ) ; Calendar calendar = getCalendar ( ) ; while ( year == dateTimeUnit . getYear ( ) ) { periods . add ( createPeriod ( dateTimeUnit , null ) ) ; dateTimeUnit = calendar . plusDays ( dateTimeUnit , 1 ) ; } return periods ; }
generates daily periods for the whole year in which the given period ' s startdate exists .
