/// <summary> /// Second Monday in October /// </summary> /// <param name="year"></param> /// <returns></returns> public static DateTime Thanksgiving(int year) { var hol = new DateTime(year, 10, 8); hol = HolidayCalculator.FindFirstMonday(hol); return(hol); }
/// <summary> /// Last Monday in May /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static Holiday MemorialDay(int year) { var hol = new DateTime(year, 5, 25); hol = HolidayCalculator.FindFirstMonday(hol); return(new Holiday(hol, hol)); }
/// <summary> /// First Monday in September /// </summary> /// <param name="year"></param> /// <returns></returns> public static DateTime LabourDay(int year) { var hol = new DateTime(year, 9, 1); hol = HolidayCalculator.FindFirstMonday(hol); return(hol); }
/// <summary> /// Third Monday in January /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static Holiday MartinLutherKing(int year) { var hol = new DateTime(year, 1, 15); hol = HolidayCalculator.FindFirstMonday(hol); return(new Holiday(hol, hol)); }
/// <summary> /// Washington's Birthday aka Presidents Day. Third Monday in February /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static Holiday PresidentsDay(int year) { var hol = new DateTime(year, 2, 15); hol = HolidayCalculator.FindFirstMonday(hol); return(new Holiday(hol, hol)); }
/// <summary> /// Summer bank holiday (last Monday in August) /// </summary> /// <param name="year"></param> /// <returns></returns> public static DateTime Summer(int year) { DateTime hol = new DateTime(year, 8, 25); hol = HolidayCalculator.FindFirstMonday(hol); return(hol); }
/// <summary> /// Second Monday in October /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static Holiday ColumbusDay(int year) { var hol = new DateTime(year, 10, 8); hol = HolidayCalculator.FindFirstMonday(hol); return(new Holiday(hol, hol)); }
/// <summary> /// Returns "Early Spring"/"May Day" holiday (first Monday in May). Created in 1978. /// </summary> /// <param name="year"></param> /// <returns>(Nullable)date for Early May Bank Holiday (null before 1978)</returns> public static DateTime? MayDay(int year) { //warning- should be null for < 1977 if (year < 1978) return null; if (year == 1995) return new DateTime(1995, 5, 8); //1995 moved for 50th anniversary of VE day if (year == 2020) return new DateTime(2020, 5, 8); // 2020 moved for 75th anniversary of VE day DateTime hol = new DateTime(year, 5, 1); hol = HolidayCalculator.FindFirstMonday(hol); return hol; }
/// <summary> /// Returns "Early Spring"/"May Day" holiday (first Monday in May). Created in 1978. /// </summary> /// <param name="year"></param> /// <returns>(Nullable)date for Early May Bank Holiday (null before 1978)</returns> public static DateTime?MayDay(int year) { //warning- should be null for < 1977 if (year < 1978) { return(null); } if (year == 1995) { return(new DateTime(1995, 5, 8)); //1995 moved for 50th anniversary of VE day } DateTime hol = new DateTime(year, 5, 1); hol = HolidayCalculator.FindFirstMonday(hol); return(hol); }
/// <summary> /// Lá Saoire i mí Lúnasa - August Holiday /// </summary> /// <param name="year"></param> public static DateTime AugustHoliday(int year) { return(HolidayCalculator.FindFirstMonday(new DateTime(year, 8, 1))); }
/// <summary> /// Coming of Age Day (成人の日 Seijin no Hi) /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static DateTime ComingOfAgeDay(int year) { //second Monday of January return(HolidayCalculator.FindFirstMonday(new DateTime(year, 1, 1)) .AddDays(7)); }
/// <summary> /// Health and Sports Day (体育の日 Taiiku no Hi) /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static DateTime HealthAndSportsDay(int year) { //Second Monday of October return(HolidayCalculator.FindFirstMonday(new DateTime(year, 10, 1)).AddDays(7)); }
/// <summary> /// Respect for the Aged Day (敬老の日 Keirō no Hi) /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static DateTime RespectForTheAgedDay(int year) { //Third Monday of September return(HolidayCalculator.FindFirstMonday(new DateTime(year, 9, 1)).AddDays(14)); }
/// <summary> /// Marine Day (海の日 Umi no Hi) /// </summary> /// <param name="year">The year.</param> /// <returns></returns> public static DateTime MarineDay(int year) { //3rd Monday in July return(HolidayCalculator.FindFirstMonday(new DateTime(year, 7, 1)).AddDays(14)); }