SAL
unread,Nov 24, 2011, 1:16:56 PM11/24/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-...@googlegroups.com
I tried building a simple rule and then created an iterator with a start date using an alternate chronology. Is this supported? The results I got were that all returned dates seemed to be using the ISO chronology. Here is my test code:
RRule rr = new RRule();
rr.setFreq(Frequency.YEARLY);
rr.setCount(7);
rr.setName("RRULE");
BuddhistChronology chron = BuddhistChronology.getInstance(DateTimeZone.getDefault());
DateTime dt = new DateTime(2500, 1, 1, 0, 0, chron);
System.out.println(dt.getChronology().toString());
System.out.println(dt.toString());
System.out.println(dt.toDateTimeISO().toString());
DateTimeIterator dti = DateTimeIteratorFactory.createDateTimeIterator(rr.toIcal(), dt, dt.getZone(), true);
DateTimeFormatter dtf = DateTimeFormat.forPattern(TEST_DATE_FORMAT);
//dtf = dtf.withChronology(chron);
while (dti.hasNext())
{
DateTime dt1 = dti.next();
System.out.print(dt1.getChronology().toString());
System.out.print(" ");
System.out.print(dt1.toString());
System.out.print(" ");
System.out.print(dtf.print(dt1));
System.out.print(" ");
DateTime dt2 = dt1.toDateTimeISO();
System.out.print(dt2.toString());
System.out.print(" ");
System.out.println(dtf.print(dt2));
}
Wondering if this is expected to work right?