question: @ Override public List < Period > generateRollingPeriods ( DateTimeUnit dateTimeUnit ) { Calendar cal = getCalendar ( ) ; dateTimeUnit . setDay ( 1 ) ; dateTimeUnit = cal . minusMonths ( dateTimeUnit , 11 ) ; List < Period > periods = Lists . newArrayList ( ) ; for ( int i = 0 ; i < 12 ; i ++ ) { periods . add ( createPeriod ( dateTimeUnit , cal ) ) ; dateTimeUnit = cal . plusMonths ( dateTimeUnit , 1 ) ; } return periods ; }
target:  Generates the last 12 months where the last one is the month which the given date is inside.