title: dday ical and google calendar until problems
body: <p>Hi I have this <a href="http://sourceforge.net/projects/dday-ical/files/dday-ical/1.0%20Beta%20Candidate/" rel="nofollow">ical (1.0 beta)</a></p>
  
  <p>I have this code</p>
  
  <pre><code>IICalendarCollection iCal = iCalendar.LoadFromStream(fileStream); 
  foreach (var ic in iCal) 
  { 
      foreach (var evt in ic.Events)
      { 
          DateTime now = DateTime.UtcNow.Date; 
          if (evt.Start.UTC.Date.CompareTo(now) &gt;= 0 &amp;&amp; evt.End.UTC.Date.CompareTo(now) &gt;= 0) 
          { 
              foreach (var rule in evt.RecurrenceRules) 
              { 
                  if (rule.Frequency == FrequencyType.Daily) 
                  { 
                      // always false until is never set. 
                      bool doesRepeatingEnd = DoesRepeatingEnd(rule); 
                      if (doesRepeatingEnd) 
                      {
                          TimeSpan until = now.Subtract(rule.Until); 
                          int days = until.Days; 
                      } 
                      else { }    
                  } else if (rule.Frequency == FrequencyType.Weekly) 
                  { 
                  } 
                  else if (rule.Frequency == FrequencyType.Monthly) 
                  { 
                  } 
                  else if (rule.Frequency == FrequencyType.Yearly) 
                  { 
                  }
  
              } 
      }   } 
  }
  
  
          private static bool DoesRepeatingEnd(IRecurrencePattern rule) 
          { 
              DateTime until = rule.Until; 
              return until != DateTime.MinValue; 
          }
  </code></pre>
  
  <p>I import a google calendar in(ical format)</p>
  
  <pre><code>BEGIN:VCALENDAR 
  PRODID:-//Google Inc//Google Calendar 70.9054//EN 
  VERSION:2.0 
  CALSCALE:GREGORIAN 
  METHOD:PUBLISH 
  X-WR-CALNAME:
   Name X-WR-TIMEZONE:America/Washington 
   BEGIN:VTIMEZONE 
   TZID:America/Washington 
   X-LIC-LOCATION:America/Washington 
   BEGIN:DAYLIGHT 
   TZOFFSETFROM:-0800 
   TZOFFSETTO:-0700 
   TZNAME:PDT 
   DTSTART:19700308T020000
   RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU 
   END:DAYLIGHT
   BEGIN:STANDARD 
   TZOFFSETFROM:-0700 
   TZOFFSETTO:-0800 
   TZNAME:PST 
   DTSTART:19701101T020000 
   RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU 
   END:STANDARD 
   END:VTIMEZONE 
   BEGIN:VEVENT 
   DTSTART;VALUE=DATE:20110530 
   DTEND;VALUE=DATE:20110531 
   RRULE:FREQ=DAILY;UNTIL=20110604 
   DTSTAMP:20110424T202756Z 
   UID:fl16scis3l3qmhrrbb6uhkmo98@google.com 
   CREATED:20110424T202406Z 
   DESCRIPTION: 
   LAST-MODIFIED:20110424T202406Z 
   LOCATION: 
   SEQUENCE:0 
   STATUS:CONFIRMED 
   SUMMARY:dd 
   TRANSP:TRANSPARENT 
   END:VEVENT 
   END:VCALENDAR
  </code></pre>
  
  <p>as you can see I have  <code>RRULE:FREQ=DAILY;UNTIL=20110604</code> but my code never picks it up rule.Until is always like the default datetime.</p>
  
  <p>Anyone have any ideas?</p>
  
  <p>Thanks </p>