question: @ Override public List < Period > generatePeriods ( DateTimeUnit dateTimeUnit ) { Calendar cal = getCalendar ( ) ; boolean past = dateTimeUnit . getMonth ( ) >= ( getBaseMonth ( ) + 1 ) ; List < Period > periods = Lists . newArrayList ( ) ; dateTimeUnit = cal . minusYears ( dateTimeUnit , past ? 5 : 6 ) ; dateTimeUnit . setMonth ( getBaseMonth ( ) + 1 ) ; dateTimeUnit . setDay ( 1 ) ; Calendar calendar = getCalendar ( ) ; for ( int i = 0 ; i < 11 ; i ++ ) { periods . add ( createPeriod ( dateTimeUnit , cal ) ) ; dateTimeUnit = calendar . plusYears ( dateTimeUnit , 1 ) ; } return periods ; }
target:  Generates financial yearly periods for the last 5, current and next 5 financial years.