class PersianCalendar extends AbstractCalendar {

    @Override
    public DateTimeUnit minusMonths( DateTimeUnit dateTimeUnit, int months )
    {
        DateTimeUnit result = new DateTimeUnit( dateTimeUnit );
        int newMonths = months;

        while ( newMonths != 0 )
        {
            result.setMonth( result.getMonth() - 1 );

            if ( result.getMonth() < 1 )
            {
                result.setMonth( monthsInYear() );
                result.setYear( result.getYear() - 1 );
            }

            newMonths--;
        }

        updateDateUnit( result );

        return result;
    }

}