コード例 #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)));
 }