question: public void replacePeriodsWithStartEndDates ( ) { List < Period > periods = asTypedList ( getDimensionOrFilterItems ( PERIOD_DIM_ID ) ) ; for ( Period period : periods ) { Date start = period . getStartDate ( ) ; Date end = period . getEndDate ( ) ; if ( startDate == null || ( start != null && start . before ( startDate ) ) ) { startDate = start ; } if ( endDate == null || ( end != null && end . after ( endDate ) ) ) { endDate = end ; } } removeDimensionOrFilter ( PERIOD_DIM_ID ) ; }
target:  Replaces periods with start and end dates, using the earliest start date from the periods as start date and the latest end date from the periods as end date. Remove the period dimension or filter.