I am truely greateful for a wonderful library. I have a bug to report.
@Test
public void reproduceAdanceToMethodBug() throws ParseException {
// given
String rData = "RRULE:FREQ=MONTHLY;INTERVAL=1;BYDAY=TU;BYSETPOS=4";
DateTime recurrenceStart = new DateTime(2015, 2, 20, 0, 0, 0, 0, DateTimeZone.UTC);
DateTime skipBefore = new DateTime(2015, 4, 20, 0, 0, 0, 0, DateTimeZone.UTC);
DateTimeIterator iterator = DateTimeIteratorFactory.createDateTimeIterable(rData, recurrenceStart, recurrenceStart.getZone(), true).iterator();
// when
iterator.advanceTo(skipBefore);
// then
assertThat(iterator.next(), is(new DateTime(2015, 4, 28, 0, 0, 0, 0, DateTimeZone.UTC)));
}
Test case above results in AssertionErrror.
java.lang.AssertionError:
Expected: is <2015-04-28T00:00:00.000Z>
but: was <2015-05-26T00:00:00.000Z>
DateTimeIterator.advanceTo() method skips 2015-04-28T00:00:00.
It seems to work correctly with rData without 'FREQ=MONTHLY + BYSETPOS'
combination.
Original issue reported on code.google.com by ryej...@gmail.com on 4 May 2015 at 8:08
Original issue reported on code.google.com by
ryej...@gmail.com
on 4 May 2015 at 8:08