Пример #1
0
 public static int HappenAtSeconds(this Holiday holiday)
 {
     return(HappenInTime(holiday).Seconds);
 }
Пример #2
0
 public static void SetNewCustomHoliday(Holiday holidayToAddInCustom)
 {
     CustomHolidayList.Add(holidayToAddInCustom);
 }
Пример #3
0
 public static int HappenAtMinutes(this Holiday holiday)
 {
     return(HappenInTime(holiday).Minutes);
 }
Пример #4
0
 public static int HappenHours(this Holiday holiday)
 {
     return(HappenInTime(holiday).Hours);
 }
Пример #5
0
 public static int HappenInDays(this Holiday holiday)
 {
     return(HappenInTime(holiday).Days);
 }
Пример #6
0
 public static TimeSpan HappenInTime(this Holiday holiday)
 {
     return(holiday.Date - DateTime.Now.Date);
 }
Пример #7
0
 public static bool IsHoliday(this DateTime dateToTest)
 {
     return(Holiday.GetAllByYear(dateToTest.Year).Any(x => x.Date.Date.Equals(dateToTest.Date)));
 }