//----------------------------------------------------------------------------------------------------- /// <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)); }
public static HolidayLogic GetInstance(int year) { if (_instance == null || year != _instance.CurrentYear) { _instance = new HolidayLogic(year); return(_instance); } return(_instance); }