0

I am workgin with google calendar api and I am using iCal4j to generate recurrence string. I would use this library also to check a string that should contain a recurrence string. How I can do that? There is an other way to do? Thank you a lot for any Help Alberto :)

Alberto R.
  • 161
  • 2
  • 10

1 Answers1

0

If the string contains only the RRULE value, then, you can use the net.fortuna.ical4j.model.property.RRule(String value) constructor or net.fortuna.ical4j.model.Recur(String value) constructor and check for exceptions.

new Recur("FREQ=somejunk") will throw an IllegalArgumentException while

new Recur("FREQ=DAILY;UNTIL=bogus") will throw a ParseException

Arnaud Quillaud
  • 4,420
  • 1
  • 12
  • 8
  • thanks! Then I supposed there are no method returing a boolean to ask if a string is a valid rrule or not. Something strange also : I check RRule code and there is a validate method, private :( not implemented – Alberto R. Sep 18 '13 at 19:20