public static int HappenAtSeconds(this Holiday holiday) { return(HappenInTime(holiday).Seconds); }
public static void SetNewCustomHoliday(Holiday holidayToAddInCustom) { CustomHolidayList.Add(holidayToAddInCustom); }
public static int HappenAtMinutes(this Holiday holiday) { return(HappenInTime(holiday).Minutes); }
public static int HappenHours(this Holiday holiday) { return(HappenInTime(holiday).Hours); }
public static int HappenInDays(this Holiday holiday) { return(HappenInTime(holiday).Days); }
public static TimeSpan HappenInTime(this Holiday holiday) { return(holiday.Date - DateTime.Now.Date); }
public static bool IsHoliday(this DateTime dateToTest) { return(Holiday.GetAllByYear(dateToTest.Year).Any(x => x.Date.Date.Equals(dateToTest.Date))); }