dmfs / lib-recur

A recurrence processor for Java
Apache License 2.0
198 stars 47 forks source link

RecurrenceRule.toString() method displaying wrong output #78

Closed Berenger-Zina closed 4 years ago

Berenger-Zina commented 4 years ago

Hello I'm trying to use your library version(0.11.5) to dynamically create a rrule string. But when setting SKIP to FORWARD, the toString method is displaying an incorrect output: The RSCALE value is wrong. I tried to debug and came to the conclusion that there was no toString method redefinition in GregorianCalendarMetrics class.

Here is the code I used : RecurrenceRule recurrenceRule = new RecurrenceRule(Freq.MONTHLY); recurrenceRule.setCount(5); recurrenceRule.setInterval(1); recurrenceRule.setSkip(RecurrenceRule.Skip.FORWARD); recurrenceRule.setWeekStart(Weekday.MO); System.out.println(recurrenceRule.toString());

And here is the output: FREQ=MONTHLY;RSCALE=org.dmfs.rfc5545.calendarmetrics.GregorianCalendarMetrics@34cd072c;SKIP=FORWARD;COUNT=5

dmfs commented 4 years ago

I'll cover that in https://github.com/dmfs/rfc5545-datetime/issues/3 and update the dependency here.

dmfs commented 4 years ago

Fixed: https://github.com/dmfs/lib-recur/blob/master/src/test/java/org/dmfs/rfc5545/recur/RecurrenceRuleTest.java#L83

dmfs commented 4 years ago

released in 0.11.6