private static TimeZoneRule createRuleByRDATE(String tzname,
            int rawOffset, int dstSavings, long start, List<String> dates, int fromOffset) {
        // Create an array of transition times
        long[] times;
        if (dates == null || dates.size() == 0) {
            // When no RDATE line is provided, use start (DTSTART)
            // as the transition time
            times = new long[1];
            times[0] = start;
        } else {
            times = new long[dates.size()];
            int idx = 0;
            try {
                for (String date : dates) {
                    times[idx++] = parseDateTimeString(date, fromOffset);
                }
            } catch (IllegalArgumentException iae) {
                return null;
            }
        }
        return new TimeArrayTimeZoneRule(tzname, rawOffset, dstSavings, times, DateTimeRule.UTC_TIME);
    }
private static TimeZoneRule createRuleByRDATE ( String tzname , int rawOffset , int dstSavings , long start , List < String > dates , int fromOffset ) { long [ ] times ; if ( dates == null || dates . size ( ) == 0 ) { times = new long [ 1 ] ; times [ 0 ] = start ; } else { times = new long [ dates . size ( ) ] ; int idx = 0 ; try { for ( String date : dates ) { times [ idx ++ ] = parseDateTimeString ( date , fromOffset ) ; } } catch ( IllegalArgumentException iae ) { return null ; } } return new TimeArrayTimeZoneRule ( tzname , rawOffset , dstSavings , times , DateTimeRule . UTC_TIME ) ; }
/*
Create a TimeZoneRule by the RDATE definition