コード例 #1
0
ファイル: MonthlyBillingBL.cs プロジェクト: akio4800/fh
        //-----------------------------------------------------------------------------------------------------
        /// <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
ファイル: AustrianHolidays.cs プロジェクト: akio4800/fh
 public static HolidayLogic GetInstance(int year)
 {
     if (_instance == null || year != _instance.CurrentYear)
     {
         _instance = new HolidayLogic(year);
         return(_instance);
     }
     return(_instance);
 }