virtual public bool OccursOn(IDateTime DateTime)
{
foreach (IPeriod p in m_Evaluator.Periods)
// NOTE: removed UTC from date checks, since a date is a date.
if (p.StartTime.Date == DateTime.Date || // It's the start date OR
(p.StartTime.Date <= DateTime.Date && // It's after the start date AND
(p.EndTime.HasTime && p.EndTime.Date >= DateTime.Date || // an end time was specified, and it's after the test date
(!p.EndTime.HasTime && p.EndTime.Date > DateTime.Date)))) // an end time was not specified, and it's before the end date
// NOTE: fixed bug as follows:
// DTSTART;VALUE=DATE:20060704
// DTEND;VALUE=DATE:20060705
// Event.OccursOn(new iCalDateTime(2006, 7, 5)); // Evals to true; should be false
return true;
return false;
}