class PersianCalendar extends AbstractCalendar {

    @Override
    public DateTimeUnit minusDays( DateTimeUnit dateTimeUnit, int days )
    {
        int curYear = dateTimeUnit.getYear();
        int curMonth = dateTimeUnit.getMonth();
        int curDay = dateTimeUnit.getDay();
        int dayOfWeek = dateTimeUnit.getDayOfWeek();
        int newDays = days;

        while ( newDays != 0 )
        {
            curDay--;

            if ( curDay == 0 )
            {
                curMonth--;

                if ( curMonth == 0 )
                {
                    curYear--;
                    curMonth = 12;
                }

                curDay = getDaysFromMap( curYear, curMonth );
            }

            dayOfWeek--;

            if ( dayOfWeek == 0 )
            {
                dayOfWeek = 7;
            }

            newDays--;
        }

        return new DateTimeUnit( curYear, curMonth, curDay, dayOfWeek );
    }

}