public void BasicRangeInYearTest2() { var range = new RangeEachYearTE(6, 9, 15, 30); Assert.IsFalse(range.Includes(new DateTime(2012, 6, 1))); Assert.IsTrue(range.Includes(new DateTime(2012, 6, 15))); }
/// <summary> /// The witching hour prep is every Saturday night at midnight in October /// except on Halloween when the main event occurs (separate event). /// </summary> /// <returns></returns> private static TemporalExpression BuildWitchingHourPrepTemporalExpression() { var halloween = new FixedHolidayTE(10, 31); var holidays = new UnionTE(); holidays.Add(halloween); var everySaturdayNight = new DayOfMonthTE(6); var october = new RangeEachYearTE(10); var saturdays = new UnionTE(); saturdays.Add(everySaturdayNight); var intersection = new IntersectionTE(); intersection.Add(october); intersection.Add(saturdays); var diff = new DifferenceTE(intersection, holidays); return diff; }