question: @ 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 , 1 ) ; } return periods ; }
target:  Generates monthly Periods for the whole year in which the given Period's startDate exists.