ical4j-connector: how to get all events in a month

  • Hi,

    I am starting to use ical4j-connector to connect to a caldav server (davical) and then show the events in an UI.

    I can put events in davical using ical4j-connector, but I am having troubles retrieving them.

    For example, I want to list all events in a certain month. I figured getEventsForTimePeriod could do it but I am not sure what the collection parameter means. It seems it copies the events from the period into another collection? How do you use this method?

    What is the preferred way of showing a calender with the events of a single month?


  • Pascal Robert
    Pascal Robert

    getEventsForTimePeriod is the correct method to use, and no, it doesn't copies the events into another CalDAV collection. The "calendar" parameter is the CalDAV collection where you want the events from.

  • After some debugging it seems getEventsForTimePeriod from 0.9.3 does not work: for example it expects a "supported-calendar-data" while the server sends a "calendar-data"

    I compiled 0.9.4-SNAPSHOT from source and this works flawlessly. It also does not use the 'weird' connection parameter from 0.9.3 anymore.

    Is 0.9.4 already released?

    • Ben Fortuna
      Ben Fortuna

      Hi Ralph,

      0.9.4 isn't released yet, but I will try to get this released in the next week or two.


  • That would be great, thanks!