class QuarterlyPeriodType extends CalendarPeriodType {

    @Override
    public List<Period> generatePeriods( DateTimeUnit dateTimeUnit )
    {
        org.hisp.dhis.calendar.Calendar cal = getCalendar();

        dateTimeUnit.setMonth( 1 );
        dateTimeUnit.setDay( 1 );

        int year = dateTimeUnit.getYear();
        List<Period> periods = Lists.newArrayList();

        while ( year == dateTimeUnit.getYear() )
        {
            periods.add( createPeriod( dateTimeUnit, cal ) );
            dateTimeUnit = cal.plusMonths( dateTimeUnit, 3 );
        }

        return periods;
    }

}