예제 #1
0
        private Holiday(HolidayTypes objHolidayType, int intYear)
        {
            _objHolidayType = objHolidayType;

            switch (_objHolidayType)
            {
            case HolidayTypes.ChristmasDay:
                _dtValue = Holidays.ChristmasDay(intYear);
                _strName = "Christmas";
                break;

            case HolidayTypes.ChristmasObserved:
                _dtValue = Holidays.ChristmasHoliday(intYear);
                _strName = "Christmas (observed)";
                break;

            case HolidayTypes.ColumbusDay:
                _dtValue = Holidays.ColumbusDay(intYear);
                _strName = "Columbus Day";
                break;

            case HolidayTypes.IndependenceDay:
                _dtValue = Holidays.IndependenceDay(intYear);
                _strName = "Independence Day (US)";
                break;

            case HolidayTypes.IndependenceDayObserved:
                _dtValue = Holidays.IndependenceHoliday(intYear);
                _strName = "Independance Day (US) (obs.)";
                break;

            case HolidayTypes.LaborDay:
                _dtValue = Holidays.LaborDay(intYear);
                _strName = "Labor Day";
                break;

            case HolidayTypes.MartinLutherKingDay:
                _dtValue = Holidays.MartinLutherKingDay(intYear);
                _strName = "Martin Luther King Day";
                break;

            case HolidayTypes.MemorialDay:
                _dtValue = Holidays.MemorialDay(intYear);
                _strName = "Memorial Day";
                break;

            case HolidayTypes.NewYearsDay:
                _dtValue = Holidays.NewYearsDay(intYear);
                _strName = "New Years Day";
                break;

            case HolidayTypes.NewYearsObserved:
                _dtValue = Holidays.NewYearsHoliday(intYear);
                _strName = "New Years (observed)";
                break;

            case HolidayTypes.PresidentsDay:
                _dtValue = Holidays.PresidentsDay(intYear);
                _strName = "Presidents Day (US)";
                break;

            case HolidayTypes.ThanksgivingDay:
                _dtValue = Holidays.ThanksgivingDay(intYear);
                _strName = "Thanksgiving Day";
                break;
            }

            _strName = _strName + " " + _dtValue.Year + "-" + StringFunctions.TwoDigitFormat(_dtValue.Month) + "-" + StringFunctions.TwoDigitFormat(_dtValue.Day);
        }