RecurrenceRule check a Datetime

2 posts, 0 answers
  1. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 22 Mar 2011 Link to this post

    Hi
    I want to check with a RecurrenceRule whether a given point in time covered by this rule or not.


    How can I do that?

    Greetings
    markus
  2. Markus
    Markus avatar
    20 posts
    Member since:
    Dec 2009

    Posted 23 Mar 2011 Link to this post

    hi

    I finde a solution. it is very simpel if you use LINQ;

    here the Code:
    var result = from d in rrule.Occurrences
    where forDate >= d && forDate <= d.Add(rrule.Range.EventDuration)
    select d;

    Greatings
    Markus
Back to Top