Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjorn Simpson 9 posts 49 karma points
    Aug 27, 2014 @ 19:37
    Bjorn Simpson
    0

    Bug? Monthly and Yearly recurring events

    First off a huge thank you for this project, it's most helpful.

    I'm seeing two issues with recurring events however:

    Issue #1. With monthly recurring events when I "use start date", and call getEvents, I get a list of events on the wrong day, and they start before the event's start date. To reproduce this issue:

    a. Create a new event named Event1 with start date of August 1 2014 and end date of August 1 2015. Set recurrence to Monthly, with "Use start date". So this event should, I believe, be scheduled for the first of every month between August 2014 and August 2015.

    b. Call getEvents for a specific time period, e.g.

    @foreach (CalendarEvent ce in Calendar.getEvents(DateTime.Now.AddDays(-30), DateTime.Now.AddDays(30), "calendar", 1099))
    {
    <li>
    @ce.startDate.ToShortDateString() - @ce.content.Name
    </li>
    }

    Where 1099 is the id of the node that contains my events.

    Expected results:

    8/1/2014 - Event1

    Actual results, and note incorrect day (28th instead of 1st) and the fact that one of these is before my event's start date of August 1 2014:

    7/28/2014 - Event1
    8/28/2014 - Event1

     

    Issue #2: In both monthly and yearly recurring events, when using either "Use start date" or specifying an iteration, the events returned by getEvents include events that pre-date the event's start date, and actually they go all the way back to year 1. To reproduce this issue:

    a. Create a new event named Event2 with start date of August 1 2014 and end date of August 1 2015. Set recurrence to Yearly, with "Use start date". So this event should, I believe, be scheduled twice: Aug 1 2014 and Aug 1 2015.

    b. Call getEvents for all events, e.g.

    @foreach (CalendarEvent ce in Calendar.getEvents(DateTime.MinValue, DateTime.MaxValue, "calendar", 1099))
    {
    <li>
    @ce.startDate.ToShortDateString() - @ce.content.Name
    </li>
    }

    Where, again, 1099 is the id of the node that contains my events.

    Expected results:

    8/1/2014 - Event2
    8/1/2015 - Event2

    Actual results, note events start in year 1:

    8/1/0001 - Event2
    8/1/0002 - Event2
    8/1/0003 - Event2
    8/1/0004 - Event2
    8/1/0005 - Event2
    ...
    8/1/2012 - Event2
    8/1/2013 - Event2
    8/1/2014 - Event2
    8/1/2015 - Event2

     

    Thank you again for your work on this project!

  • Ole Martin Bakke 112 posts 624 karma points
    Aug 27, 2014 @ 22:52
    Ole Martin Bakke
    100

    Thanks for you bug report. It's very thorough and easy to recreate/debug when you provide all this information!

    These issues are related to each other and I've just uploaded a new version (0.1.5) that hopefully will fix these issues for you.

  • Bjorn Simpson 9 posts 49 karma points
    Sep 04, 2014 @ 00:20
    Bjorn Simpson
    0

    Thank you so very much, this looks like it's completely fixed the problem! Very grateful.

Please Sign in or register to post replies

Write your reply to:

Draft