#131 creating negative Dur throws exception

Beta (1.0)
pending-works-for-me
Ben Fortuna
Parsing (53)
5
2011-07-09
2011-06-26
Anonymous
No

Use Dur with negative direction "-P2D" (RFC2445 4.3.6 Duration)

Dur negative = new Dur("-P2D");
or
Dur negative = new Dur(-2,0,0,0);
throw
Exception in thread "main" java.lang.IllegalArgumentException: Range start must be before range end
at net.fortuna.ical4j.model.DateRange.<init>(DateRange.java:71)
at net.fortuna.ical4j.model.Period.<init>(Period.java:101)
at de.tbon.iCal.test.OpeniCal.createTodaysEvents(OpeniCal.java:115)
at de.tbon.iCal.test.OpeniCal.main(OpeniCal.java:91)

Discussion

  • Ben Fortuna
    Ben Fortuna
    2011-07-09

    Hi,

    I have added a test using your examples and it seems to work ok. Are u able to provide a test case to demonstrate the problem?

     
  • Ben Fortuna
    Ben Fortuna
    2011-07-09

    • status: open --> pending-works-for-me