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

@ Override public List < Period > generatePeriods ( DateTimeUnit dateTimeUnit ) { Calendar cal = getCalendar ( ) ; dateTimeUnit . setMonth ( 1 ) ; dateTimeUnit . setDay ( 1 ) ; List < Period > periods = Lists . newArrayList ( ) ; int year = dateTimeUnit . getYear ( ) ; while ( dateTimeUnit . getYear ( ) == year ) { periods . add ( createPeriod ( dateTimeUnit , cal ) ) ; dateTimeUnit = cal . plusMonths ( dateTimeUnit , 2 ) ; } return periods ; }
generates bimonthly periods for the whole year in which the start date of the given period exists .
