Exemple #1
0
 private static bool IsDateInRange(DateTimeOffset date, SchoolHolidayData h)
 {
     if (h.Holidays.EndDate.HasValue)
     {
         return(date.Date >= h.Holidays.StartDate.Value.Date && date.Date <= h.Holidays.EndDate.Value.Date);
     }
     else
     {
         return(date.Date == h.Holidays.StartDate.Value.Date);
     }
 }
Exemple #2
0
 private static bool IsForZone(SchoolZone zone, SchoolHolidayData h)
 {
     return(h.Holidays.Zones.Equals($"Zone {zone}", StringComparison.OrdinalIgnoreCase));
 }