class PersianCalendar extends AbstractCalendar {

    @Override
    public DateInterval toInterval( DateTimeUnit dateTimeUnit, DateIntervalType type, int offset, int length )
    {
        switch ( type )
        {
            case ISO8601_YEAR:
                return toYearIsoInterval( dateTimeUnit, offset, length );
            case ISO8601_MONTH:
                return toMonthIsoInterval( dateTimeUnit, offset, length );
            case ISO8601_WEEK:
                return toWeekIsoInterval( dateTimeUnit, offset, length );
            case ISO8601_DAY:
                return toDayIsoInterval( dateTimeUnit, offset, length );
            default:
                return null;
        }
    }

}