Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetOccurrences ignore some day range when I use weekly occurrence #235

Closed
kycuong2208 opened this issue Feb 6, 2017 · 1 comment
Closed

Comments

@kycuong2208
Copy link

kycuong2208 commented Feb 6, 2017

Hi all

I got the issue when I use Ical.net to get list Occurrences in calendar. List Occurrences will miss some event in day range such as the event from 1/1/2019 to 1/7/2019. My example below:

var calendar = new Calendar();
var rule = new RecurrencePattern("FREQ=WEEKLY;BYDAY=SU,MO,TU,WE,TH,FR,SA");
var startDateTemp=new DateTime(2018,12,30);
var endDateTemp = new DateTime(2018, 12, 31);
var vEvent = new Event
{
    DtStart = new CalDateTime(startDateTemp),
    DtEnd = new CalDateTime(endDateTemp),
    RecurrenceRules = new List<IRecurrencePattern>{ ruleTemp }
};
calendar.Events.Add(vEvent);
var startDate= new DateTime(2019, 1, 1);
var endDate = new DateTime(2019, 1, 6);
var occurrences = calendar.GetOccurrences(startDate, endDate);

=> and we will got list occurrences don't have any records.

Note: If I use daily occurrence, this issue not happen. When I tested with another date( not in range 1/1/2019 to 1/6/2019) , the system can execute exactly.

Please give me your advices.

Thanks

@kycuong2208 kycuong2208 changed the title ical.net ignore the 1/1/2019 when I use weekly occurrence GetOccurrences ignore some day range when I use weekly occurrence Feb 10, 2017
@rianjs
Copy link
Owner

rianjs commented Mar 20, 2017

@DmitriySelischev's fix published in nuget v2.2.33.

https://www.nuget.org/packages/Ical.Net/2.2.33

@rianjs rianjs closed this as completed Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants