示例#1
0
        //-----------------------------------------------------------------------------------------------------
        /// <summary>
        /// Überprüft ob es sich bei dem Tag um einen Sonntag oder Feiertag handelt
        /// </summary>
        /// <param name="currentDate"></param>
        /// <returns></returns>
        public bool IsHoliday(DateTime currentDate)
        {
            HolidayLogic austrianHolidays = HolidayLogic.GetInstance(currentDate.Year);
            String       d   = currentDate.ToString("dddd");
            bool         isH = austrianHolidays.IsHoliday(currentDate);

            return(currentDate.ToString("dddd") == "Sonntag" || austrianHolidays.IsHoliday(currentDate));
        }
示例#2
0
 public static HolidayLogic GetInstance(int year)
 {
     if (_instance == null || year != _instance.CurrentYear)
     {
         _instance = new HolidayLogic(year);
         return(_instance);
     }
     return(_instance);
 }