Esempio n. 1
0
        /// <summary>
        /// Returs true if the given date is Columbus Day
        /// </summary>
        public static DateTime ColumbusDay(int intYear)
        {
            //Second Monday in Oct
            DateTime p_date = new DateTime(intYear, 10, 1);
            DateTime _day   = new DateTime(intYear, 10, DateTools.NthDayOfWeekOfMonth(2, DayOfWeek.Monday, p_date));

            return(_day);
        }
Esempio n. 2
0
        /// <summary>
        /// Returs true if the given date is Memorial Day
        /// </summary>
        public static bool IsMemorialDay(DateTime p_date)
        {
            //Last monday in May
            bool _return;

            _return = p_date.Month == 5 && (p_date.Day == DateTools.NthDayOfWeekOfMonth(5, DayOfWeek.Monday, p_date));
            return(_return);
        }
Esempio n. 3
0
        /// <summary>
        /// Returs true if the given date is Labor Day
        /// </summary>
        public static DateTime LaborDay(int intYear)
        {
            //First Monday in Sept.
            DateTime p_date = new DateTime(intYear, 9, 1);
            DateTime _day   = new DateTime(intYear, 9, DateTools.NthDayOfWeekOfMonth(1, DayOfWeek.Monday, p_date));

            return(_day);
        }
Esempio n. 4
0
        /// <summary>
        /// Returs true if the given date is Presidents Day
        /// </summary>
        public static DateTime PresidentsDay(int intYear)
        {
            //Third Monday in Feb
            DateTime p_date = new DateTime(intYear, 2, 1);
            DateTime _day   = new DateTime(intYear, 2, DateTools.NthDayOfWeekOfMonth(3, DayOfWeek.Monday, p_date));

            return(_day);
        }
Esempio n. 5
0
        /// <summary>
        /// Returs true if the given date is Memorial Day
        /// </summary>
        public static DateTime MemorialDay(int intYear)
        {
            //Last monday in May
            DateTime p_date = new DateTime(intYear, 5, 1);
            DateTime _day   = new DateTime(intYear, 5, DateTools.NthDayOfWeekOfMonth(5, DayOfWeek.Monday, p_date));

            return(_day);
        }
Esempio n. 6
0
        /// <summary>
        /// Returs true if the given date is Martin Luther King Day
        /// </summary>
        public static DateTime MartinLutherKingDay(int intYear)
        {
            //Third monday in january
            DateTime p_date = new DateTime(intYear, 1, 1);
            DateTime _day   = new DateTime(intYear, 1, DateTools.NthDayOfWeekOfMonth(3, DayOfWeek.Monday, p_date));

            return(_day);
        }
Esempio n. 7
0
 /// <summary>
 /// Returs true if the given date is Columbus Day
 /// </summary>
 public static bool IsColumbusDay(DateTime p_date)
 {
     //Second Monday in Oct
     return(p_date.Month == 10 && (p_date.Day == DateTools.NthDayOfWeekOfMonth(2, DayOfWeek.Monday, p_date)));
 }
Esempio n. 8
0
 /// <summary>
 /// Returs true if the given date is Labor Day
 /// </summary>
 public static bool IsLaborDay(DateTime p_date)
 {
     //First Monday in Sept.
     return(p_date.Month == 9 && (p_date.Day == DateTools.NthDayOfWeekOfMonth(1, DayOfWeek.Monday, p_date)));
 }
Esempio n. 9
0
 /// <summary>
 /// Returs true if the given date is Presidents Day
 /// </summary>
 public static bool IsPresidentsDay(DateTime p_date)
 {
     //Third Monday in Feb
     return(p_date.Month == 2 && (p_date.Day == DateTools.NthDayOfWeekOfMonth(3, DayOfWeek.Monday, p_date)));
 }
Esempio n. 10
0
 /// <summary>
 /// Returs true if the given date is Martin Luther King Day
 /// </summary>
 public static bool IsMartinLutherKingDay(DateTime p_date)
 {
     //Third monday in january
     return(p_date.Month == 1 && (p_date.Day == DateTools.NthDayOfWeekOfMonth(3, DayOfWeek.Monday, p_date)));
 }