public Property createProperty(final String name, final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
public Property createProperty() { return new RRule(); } }
rule = new RRule({ freq: RRule.YEARLY, byweekday: RRule.FR, bymonth: [9], bysetpos: [1] })
public Property createProperty() { return new RRule(); } }
public Property createProperty(final ParameterList parameters, final String value) throws IOException, URISyntaxException, ParseException { return new RRule(parameters, value); }
public Property createProperty() { return new RRule(); } }
public Property createProperty() { return new RRule(); } }
public Property createProperty(final String name) { return new RRule(); } };
let rrule = new RRule({ freq: RRule.HOURLY, dtstart: new Date(2016, 7, 7, 7, 12, 0), until: new Date(2016, 7, 7, 9, 10, 0), byminute: [0, 15, 30, 45] })
/** * @param rruleString * @return null if rruleString is empty, otherwise new RRule object. */ public static RRule calculateRRule(final String rruleString) { if (StringUtils.isBlank(rruleString) == true) { return null; } try { return new RRule(rruleString); } catch (final ParseException ex) { log.error("Exception encountered while parsing rrule '" + rruleString + "': " + ex.getMessage(), ex); return null; } }
public void addRecur(Recur recur) { if (this.isIntersection) { if (this.isExcluded) { this.exRecurList.add(recur); } else { this.inclRecurList.add(recur); } } else { if (this.isExcluded) { exRuleList.add(new ExRule(recur)); } else { incRuleList.add(new RRule(recur)); } } } }
public static DateTimeIterator createDateTimeIterator( final String repeatRules, final DateTime scheduleStart, final DateTimeZone timeZone) throws ParseException { DateTime start = scheduleStart; String exdate = ""; final RRule rrule = new RRule(repeatRules); if (rrule.getFreq().ordinal() > Frequency.DAILY.ordinal()) { start = start.minusDays(1); exdate = "\nEXDATE:" + ISODateTimeFormat.basicDateTimeNoMillis().print(start.withZone(timeZone).toLocalDateTime()); } final DateTimeIterable dateIterable = DateTimeIteratorFactory.createDateTimeIterable( repeatRules + exdate, start, timeZone, true); return dateIterable.iterator(); }
@Override public void visit(Intersection expr) { this.stateStack.push(this.state); VisitorState newState = new VisitorState(); newState.isExcluded = this.state.isExcluded; newState.isIntersection = true; this.state = newState; for (TemporalExpression childExpr : expr.getExpressionSet()) { childExpr.accept(this); } this.state = this.stateStack.pop(); if (newState.inclRecurList.size() > 0) { this.incRuleList.add(new RRule(this.consolidateRecurs(newState.inclRecurList))); } if (newState.exRecurList.size() > 0) { this.exRuleList.add(new ExRule(this.consolidateRecurs(newState.exRecurList))); } }
public void setRecurrenceRules(List<Recur> recurs) { if (recurs == null) { return; } PropertyList<Property> properties = getEvent().getProperties(); for (Property rrule : properties.getProperties(Property.RRULE)) { properties.remove(rrule); } for (Recur recur : recurs) { properties.add(new RRule(recur)); } }
public void setRecurrenceRules(List<Recur> recurs) { if (recurs == null) { return; } PropertyList<Property> properties = getEvent().getProperties(); for (Property rrule : properties.getProperties(Property.RRULE)) { properties.remove(rrule); } for (Recur recur : recurs) { properties.add(new RRule(recur)); } }
/** * @return * @throws ParseException */ public static TestSuite suite() { TestSuite suite = new TestSuite(); RRule rule = new RRule(new Recur.Builder().frequency(Recur.Frequency.WEEKLY).count(3).build()); suite.addTest(new RRuleTest(rule, "FREQ=WEEKLY;COUNT=3")); suite.addTest(new RRuleTest("testValidation", rule)); suite.addTest(new RRuleTest("testEquals", rule)); return suite; }
protected void setUp() throws Exception { observance = new Standard(); observance.getProperties().add(new DtStart("16010101T030000")); observance.getProperties().add(new TzOffsetFrom("+0200")); observance.getProperties().add(new TzOffsetTo("+0100")); observance.getProperties().add(new RRule("FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU")); }