Menu

save the recurrences in a database and fire on recurred date .

Anonymous
2015-02-16
2015-02-17
  • Anonymous

    Anonymous - 2015-02-16

    Hi ,

    I am quite new to using the icalendar , I got to know how to add and
    create a recurrence object ,like

                     event.setDateStart(df.parse("2015-02-16 13:00"));
    
    
    
                     event.setDuration(new
    

    Duration.Builder().days(1).build()); //all-day event

                     Recurrence recur = new
    

    Recurrence.Builder(Frequency.DAILY).build();

                     event.setRecurrenceRule(recur);
    
    
    
    
    
                     event.setDateEnd(df.parse("2013-07-15 11:00"));
    
                     ical.addEvent(event);
    

    I need to know how do I save and retrieve the recurrence rule , in the
    database .

    Regards,

    Jithesh chandra N.

     
  • Michael Angstadt

    Hi Jitesh,

    Sorry, I cannot help you with database issues. However, I noticed something possibly wrong with the code sample you gave me.

    It looks like you are trying to define an event that occurs daily. And you are defining the date that the recurrence ends by setting the event's date end property:

    event.setDateEnd(df.parse("2013-07-15 11:00"));

    Actually, you should set this on the recurrence property, like so

    Recurrence recur = new Recurrence.Builder(Frequency.DAILY).until(df.parse("2013-07-15 11:00")).build();

    And this date must come after the start date (it is 2 years behind)!

    -Mike

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.