Ejemplo n.º 1
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Barbados
            //https://en.wikipedia.org/wiki/Public_holidays_in_Barbados

            var countryCode  = CountryCode.BB;
            var easterSunday = base.EasterSunday(year);

            var firstMondayInAugust = DateSystem.FindDay(year, 8, DayOfWeek.Monday, 1);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 1, 21, "Errol Barrow Day", "Errol Barrow Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Easter Monday", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 4, 28, "National Heroes' Day", "National Heroes' Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(50), "Whit Monday", "Whit Monday", countryCode));
            items.Add(new PublicHoliday(year, 8, 1, "Emancipation Day", "Emancipation Day", countryCode));
            items.Add(new PublicHoliday(firstMondayInAugust, "Kadooment Day", "Kadooment Day", countryCode));
            items.Add(new PublicHoliday(year, 11, 30, "Independence Day", "Independence Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "Boxing Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get
        /// </summary>
        /// <param name="year">The year</param>
        /// <returns></returns>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.SE;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var midsummerDay = DateSystem.FindDay(year, 6, 20, DayOfWeek.Saturday);
            var allSaintsDay = DateSystem.FindDay(year, 10, 31, DayOfWeek.Saturday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Nyårsdagen", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 1, 6, "Trettondedag jul", "Epiphany", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Långfredagen", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday, "Påskdagen", "Easter Sunday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Annandag påsk", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Första maj", "International Workers' Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(39), "Kristi himmelsfärds dag", "Ascension Day", countryCode));
            items.Add(new PublicHoliday(year, 6, 6, "Sveriges nationaldag", "National Day of Sweden", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(49), "Pingstdagen", "Pentecost Sunday", countryCode));
            items.Add(new PublicHoliday(midsummerDay.AddDays(-1), "Midsommarafton", "Midsummer Eve", countryCode));
            items.Add(new PublicHoliday(midsummerDay, "Midsommar", "Midsummer Day", countryCode));
            items.Add(new PublicHoliday(allSaintsDay, "Alla helgons dag", "All Saints' Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Julafton", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Juldagen", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Annandag jul", "St. Stephen's Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 31, "Nyårsafton", "New Year's Eve", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 3
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Argentina
            //https://en.wikipedia.org/wiki/Public_holidays_in_Argentina

            var countryCode  = CountryCode.AR;
            var easterSunday = base.EasterSunday(year);

            var thirdMondayInAugust   = DateSystem.FindDay(year, 8, DayOfWeek.Monday, 3);
            var secondMondayInOctober = DateSystem.FindDay(year, 10, DayOfWeek.Monday, 2);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Año Nuevo", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-48), "Carnaval", "Carnival", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-47), "Carnaval", "Carnival", countryCode));
            items.Add(new PublicHoliday(year, 3, 24, "Día Nacional de la Memoria por la Verdad y la Justicia", "Day of Remembrance for Truth and Justice", countryCode));
            items.Add(new PublicHoliday(year, 4, 2, "Día del Veterano y de los Caídos en la Guerra de Malvinas", "Day of the Veterans and Fallen of the Malvinas War", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Viernes Santo", "Good Friday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Día del Trabajador", "Labour Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 25, "Día de la Revolución de Mayo", "May Revolution", countryCode));
            items.Add(new PublicHoliday(year, 6, 17, "Paso a la Inmortalidad del General Martín Miguel de Güemes", "Anniversary of the Passing of General Martín Miguel de Güemes", countryCode, 2016));
            items.Add(new PublicHoliday(year, 6, 20, "Paso a la Inmortalidad del General Manuel Belgrano", "General Manuel Belgrano Memorial Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 9, "Día de la Independencia", "Independence Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayInAugust, "Paso a la Inmortalidad del General José de San Martín", "General José de San Martín Memorial Day", countryCode));
            items.Add(new PublicHoliday(secondMondayInOctober, "Día del Respeto a la Diversidad Cultural", "Day of Respect for Cultural Diversity", countryCode));
            items.Add(new PublicHoliday(year, 11, 20, "Día de la Soberanía Nacional", "National Sovereignty Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 8, "Día de la Inmaculada Concepción de María", "Immaculate Conception Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Navidad", "Christmas Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 4
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.LV;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var secondSundayInMay = DateSystem.FindDay(year, 5, DayOfWeek.Sunday, 2);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Jaunais Gads", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Lielā Piektdiena", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday, "Lieldienas", "Easter Sunday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Otrās Lieldienas", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Darba svētki", "Labour Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 4, "Latvijas Republikas Neatkarības atjaunošanas diena", "Restoration of Independence day", countryCode));
            items.Add(new PublicHoliday(secondSundayInMay, "Mātes diena", "Mother's day", countryCode));
            items.Add(new PublicHoliday(year, 6, 23, "Līgo Diena", "Midsummer Eve", countryCode));
            items.Add(new PublicHoliday(year, 6, 24, "Jāņi", "Midsummer Day", countryCode));
            items.Add(new PublicHoliday(year, 11, 18, "Latvijas Republikas proklamēšanas diena", "Proclamation Day of the Republic of Latvia", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Ziemassvētku vakars", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Ziemassvētki", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Otrie Ziemassvētki", "St. Stephen's Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 31, "Vecgada vakars", "New Year's Eve", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Get
        /// </summary>
        /// <param name="year">The year</param>
        /// <returns></returns>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.GD;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var firstMondayInAugust = DateSystem.FindDay(year, 8, DayOfWeek.Monday, 1);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 7, "Independence Day", "Independence Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), " Easter Monday", " Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Indian Arrival Day", "Indian Arrival Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(50), "Whit Monday", "Whit Monday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(60), "Corpus Christi", "Corpus Christi", countryCode));
            items.Add(new PublicHoliday(firstMondayInAugust, "Emancipation Day", "Emancipation Day", countryCode));
            items.Add(new PublicHoliday(year, 8, 11, "Carnival", "Carnival", countryCode));
            items.Add(new PublicHoliday(year, 10, 25, "Thanksgiving Day", "Thanksgiving Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "Boxing Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 6
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Sweden
            //https://en.wikipedia.org/wiki/Public_holidays_in_Sweden

            var countryCode  = CountryCode.SE;
            var easterSunday = base.EasterSunday(year);

            var midsummerDay = DateSystem.FindDay(year, 6, 20, DayOfWeek.Saturday);
            var allSaintsDay = DateSystem.FindDay(year, 10, 31, DayOfWeek.Saturday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "nyårsdagen", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 1, 6, "trettondedag jul", "Epiphany", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "långfredagen", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "annandag påsk", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Första maj", "International Workers' Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(39), "Kristi himmelsfärds dag", "Ascension Day", countryCode));
            items.Add(new PublicHoliday(year, 6, 6, "Sveriges nationaldag", "National Day of Sweden", countryCode));
            items.Add(new PublicHoliday(midsummerDay.AddDays(-1), "midsommarafton", "Midsummer Eve", countryCode));
            items.Add(new PublicHoliday(midsummerDay, "midsommardagen", "Midsummer Day", countryCode));
            items.Add(new PublicHoliday(allSaintsDay, "alla helgons dag", "All Saints' Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "julafton", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "juldagen", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "annandag jul", "St. Stephen's Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 31, "nyårsafton", "New Year's Eve", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Get
        /// </summary>
        /// <param name="year">The year</param>
        /// <returns></returns>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.AX;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var thirdFridayInJune       = DateSystem.FindDay(year, 6, DayOfWeek.Friday, 3);
            var thirdSaturdayInJune     = DateSystem.FindDay(year, 6, DayOfWeek.Friday, 3);
            var firstSaturdayInNovember = DateSystem.FindDay(year, 11, DayOfWeek.Friday, 3);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Nyårsdagen", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 6, 1, "Trettondagen", "Epiphany", countryCode));
            items.Add(new PublicHoliday(year, 3, 30, "Ålands demilitariseringsdag", "Demilitarization Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Långfredag", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday, "Påskdagen", "Easter Sunday", countryCode, 1642));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Annandag påsk", "Easter Monday", countryCode, 1642));
            items.Add(new PublicHoliday(year, 4, 30, "Valborgsmässoafton", "Walpurgis Night", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Första maj", "May Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(39), "Kristi himmelsfärdsdagn", "Ascension Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(49), "Pingstdagen", "Pentecost", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(50), "Annandag Pingst", "Whit Monday", countryCode));
            items.Add(new PublicHoliday(year, 6, 9, "Självstyrelsedagen", "Autonomy Day", countryCode));
            items.Add(new PublicHoliday(thirdFridayInJune, "Midsommarafton", "Midsummer Eve", countryCode));
            items.Add(new PublicHoliday(thirdSaturdayInJune, "Midsommardagen", "Midsummer Day", countryCode));
            items.Add(new PublicHoliday(firstSaturdayInNovember, "Alla helgons dag", "All Saints Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 6, "Självständighetsdagen", "Independence Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Julafton", "	Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Juldagen", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Annandag jul", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 8
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Mexico (Only Statutory holidays)
            //https://en.wikipedia.org/wiki/Public_holidays_in_Mexico

            var countryCode  = CountryCode.MX;
            var easterSunday = base.EasterSunday(year);

            var firstMondayOfFebruary = DateSystem.FindDay(year, 2, DayOfWeek.Monday, 1);
            var thirdMondayOfMarch    = DateSystem.FindDay(year, 3, DayOfWeek.Monday, 3);
            var thirdMondayOfNovember = DateSystem.FindDay(year, 11, DayOfWeek.Monday, 3);
            var newYearDay            = new DateTime(year, 1, 1).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            var laborDay        = new DateTime(year, 5, 1).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            var independenceDay = new DateTime(year, 9, 16).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            var inaugurationDay = new DateTime(year, 12, 1).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(newYearDay, "Año Nuevo", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(firstMondayOfFebruary, "Día de la Constitución", "Constitution Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayOfMarch, "Natalicio de Benito Juárez", "Benito Juárez's birthday", countryCode));
            items.Add(new PublicHoliday(laborDay, "Día del Trabajo", "Labor Day", countryCode));
            items.Add(new PublicHoliday(independenceDay, "Día de la Independencia", "Independence Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayOfNovember, "Día de la Revolución", "Revolution Day", countryCode));
            if ((year - 2) % 6 == 0)
            {
                items.Add(new PublicHoliday(inaugurationDay, "Transmisión del Poder Ejecutivo Federal", "Inauguration Day", countryCode));
            }
            items.Add(new PublicHoliday(year, 12, 25, "Navidad", "Christmas Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 9
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Isle of Man
            //https://en.wikipedia.org/wiki/Public_holidays_in_the_Isle_of_Man

            var countryCode  = CountryCode.IM;
            var easterSunday = base.EasterSunday(year);

            var firstMondayInMay   = DateSystem.FindDay(year, 5, DayOfWeek.Monday, 1);
            var lastMondayInMay    = DateSystem.FindLastDay(year, 5, DayOfWeek.Monday);
            var secondFridayInJune = DateSystem.FindDay(year, 6, DayOfWeek.Friday, 2);
            var lastMondayInAugust = DateSystem.FindLastDay(year, 8, DayOfWeek.Monday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Easter Monday", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(firstMondayInMay, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(lastMondayInMay, "Spring Bank Holiday", "Spring Bank Holiday", countryCode));
            items.Add(new PublicHoliday(secondFridayInJune, "Senior Race Day", "Senior Race Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 5, "Tynwald Day", "Tynwald Day", countryCode));
            items.Add(new PublicHoliday(lastMondayInAugust, "Late Summer Bank Holiday", "Late Summer Bank Holiday", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 10
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Jersey
            //https://en.wikipedia.org/wiki/Public_holidays_in_Jersey

            var countryCode  = CountryCode.JE;
            var easterSunday = base.EasterSunday(year);

            var firstMondayInMay   = DateSystem.FindDay(year, 5, DayOfWeek.Monday, 1);
            var lastMondayInMay    = DateSystem.FindLastDay(year, 5, DayOfWeek.Monday);
            var lastMondayInAugust = DateSystem.FindLastDay(year, 8, DayOfWeek.Monday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Easter Monday", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(firstMondayInMay, "Early May Bank Holiday", "Early May Bank Holiday", countryCode));
            items.Add(new PublicHoliday(year, 5, 9, "Liberation Day", "Liberation Day", countryCode));
            items.Add(new PublicHoliday(lastMondayInMay, "Spring Bank Holiday", "Spring Bank Holiday", countryCode));
            items.Add(new PublicHoliday(lastMondayInAugust, "Summer Bank Holiday", "Summer Bank Holiday", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 11
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode = CountryCode.PR;

            var secondMondayInJanuary    = DateSystem.FindDay(year, Month.January, DayOfWeek.Monday, Occurrence.Second);
            var thirdMondayInJanuary     = DateSystem.FindDay(year, Month.January, DayOfWeek.Monday, Occurrence.Third);
            var thirdMondayInFebruary    = DateSystem.FindDay(year, Month.February, DayOfWeek.Monday, Occurrence.Third);
            var thirdMondayInApril       = DateSystem.FindDay(year, Month.April, DayOfWeek.Monday, Occurrence.Third);
            var lastMondayInMay          = DateSystem.FindLastDay(year, Month.May, DayOfWeek.Monday);
            var thirdMondayInJuly        = DateSystem.FindDay(year, Month.July, DayOfWeek.Monday, Occurrence.Third);
            var firstMondayInSeptember   = DateSystem.FindDay(year, Month.September, DayOfWeek.Monday, Occurrence.First);
            var secondMondayInOctober    = DateSystem.FindDay(year, Month.October, DayOfWeek.Monday, Occurrence.Second);
            var fourthThursdayInNovember = DateSystem.FindDay(year, Month.November, DayOfWeek.Thursday, Occurrence.Fourth);

            var items = new List <PublicHoliday>();

            #region New Years Day with fallback

            var newYearsDay = new DateTime(year, 1, 1).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            items.Add(new PublicHoliday(newYearsDay, "Día de Año Nuevo", "New Year's Day", countryCode));

            #endregion

            items.Add(new PublicHoliday(year, 1, 6, "Día de Reyes", "Three Kings Day / Epiphany", countryCode));
            items.Add(new PublicHoliday(secondMondayInJanuary, "Natalicio de Eugenio María de Hostos", "Birthday of Eugenio María de Hostos", countryCode));
            items.Add(new PublicHoliday(thirdMondayInJanuary, "Natalicio de Martin Luther King, Jr.", "Martin Luther King, Jr. Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayInFebruary, "Día de los Presidentes", "Presidents' Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 18, "Natalicio de Luis Muñoz Marín", "Birthday of Luis Muñoz Marín", countryCode));
            items.Add(new PublicHoliday(year, 3, 22, "Día de la Abolición de Esclavitud", "Emancipation Day", countryCode));
            items.Add(this._catholicProvider.GoodFriday("Viernes Santo", year, countryCode));
            items.Add(new PublicHoliday(thirdMondayInApril, "Natalicio de José de Diego", "Birthday of José de Diego", countryCode));
            items.Add(new PublicHoliday(lastMondayInMay, "Recordación de los Muertos de la Guerra", "Memorial Day", countryCode));

            #region Independence Day with fallback

            var independenceDay = new DateTime(year, 7, 4).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            items.Add(new PublicHoliday(independenceDay, "Día de la Independencia de los Estados Unidos", "Independence Day", countryCode));

            #endregion

            items.Add(new PublicHoliday(thirdMondayInJuly, "Natalicio de Don Luis Muñoz Rivera", "Birthday of Don Luis Muñoz Rivera", countryCode));
            items.Add(new PublicHoliday(year, 7, 25, "Constitución de Puerto Rico", "Puerto Rico Constitution Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 27, "Natalicio de Dr. José Celso Barbosa", "Birthday of Dr. José Celso Barbosa", countryCode));
            items.Add(new PublicHoliday(firstMondayInSeptember, "Día del Trabajo", "Labour Day", countryCode));
            items.Add(new PublicHoliday(secondMondayInOctober, "Día de la Raza Descubrimiento de América", "Columbus Day", countryCode));

            #region Veterans Day with fallback

            var veteransDay = new DateTime(year, 11, 11).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            items.Add(new PublicHoliday(veteransDay, "Día del Veterano Día del Armisticio", "Veterans Day", countryCode));

            #endregion

            items.Add(new PublicHoliday(year, 11, 19, "Día del Descubrimiento de Puerto Rico", "Discovery of Puerto Rico", countryCode));
            items.Add(new PublicHoliday(fourthThursdayInNovember, "Día de Acción de Gracias", "Thanksgiving Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Noche Buena", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Navidad", "Christmas Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 12
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Ireland
            //https://en.wikipedia.org/wiki/Public_holidays_in_the_Republic_of_Ireland

            var countryCode  = CountryCode.IE;
            var easterSunday = base.EasterSunday(year);

            var firstMondayInMay    = DateSystem.FindDay(year, 5, DayOfWeek.Monday, 1);
            var firstMondayInJune   = DateSystem.FindDay(year, 6, DayOfWeek.Monday, 1);
            var firstMondayInAugust = DateSystem.FindDay(year, 8, DayOfWeek.Monday, 1);
            var lastMondayInOctober = DateSystem.FindLastDay(year, 10, DayOfWeek.Monday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Lá Caille", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 3, 17, "Lá Fhéile Pádraig", "Saint Patrick's Day", countryCode, 1903));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Luan Cásca", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(firstMondayInMay, "Lá Bealtaine", "May Day", countryCode, 1994));
            items.Add(new PublicHoliday(firstMondayInJune, "Lá Saoire i mí an Mheithimh", "June Holiday", countryCode, 1973));
            items.Add(new PublicHoliday(firstMondayInAugust, "Lá Saoire i mí Lúnasa", "August Holiday", countryCode));
            items.Add(new PublicHoliday(lastMondayInOctober, "Lá Saoire i mí Dheireadh Fómhair", "October Holiday", countryCode, 1977));
            items.Add(new PublicHoliday(year, 12, 25, "Lá Nollag", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Lá Fhéile Stiofáin", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 13
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            //Only Statutory holidays
            var countryCode = CountryCode.MX;

            var firstMondayOfFebruary = DateSystem.FindDay(year, Month.February, DayOfWeek.Monday, Occurrence.First);
            var thirdMondayOfMarch    = DateSystem.FindDay(year, Month.March, DayOfWeek.Monday, Occurrence.Third);
            var thirdMondayOfNovember = DateSystem.FindDay(year, Month.November, DayOfWeek.Monday, Occurrence.Third);

            var newYearDay      = new DateTime(year, 1, 1).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            var laborDay        = new DateTime(year, 5, 1).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            var independenceDay = new DateTime(year, 9, 16).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));
            var inaugurationDay = new DateTime(year, 12, 1).Shift(saturday => saturday.AddDays(-1), sunday => sunday.AddDays(1));

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(newYearDay, "Año Nuevo", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(firstMondayOfFebruary, "Día de la Constitución", "Constitution Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayOfMarch, "Natalicio de Benito Juárez", "Benito Juárez's birthday", countryCode));
            items.Add(new PublicHoliday(laborDay, "Día del Trabajo", "Labor Day", countryCode));
            items.Add(new PublicHoliday(independenceDay, "Día de la Independencia", "Independence Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayOfNovember, "Día de la Revolución", "Revolution Day", countryCode));
            if ((year - 2) % 6 == 0)
            {
                items.Add(new PublicHoliday(inaugurationDay, "Transmisión del Poder Ejecutivo Federal", "Inauguration Day", countryCode));
            }
            items.Add(new PublicHoliday(year, 12, 25, "Navidad", "Christmas Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 14
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.ZW;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var secondMondayInAugust  = DateSystem.FindDay(year, Month.August, DayOfWeek.Monday, Occurrence.Second);
            var secondTuesdayInAugust = DateSystem.FindDay(year, Month.August, DayOfWeek.Tuesday, Occurrence.Second);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 21, "Robert Mugabe National Youth Day", "Robert Mugabe National Youth Day", countryCode, 2018));
            items.Add(this._catholicProvider.GoodFriday("Good Friday", year, countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-1), "Easter Saturday", "Easter Saturday", countryCode));
            items.Add(this._catholicProvider.EasterMonday("Easter Monday", year, countryCode));
            items.Add(new PublicHoliday(year, 4, 18, "Independence Day", "Independence Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Worker's Day", "Worker's Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 25, "Africa Day", "Africa Day", countryCode));
            items.Add(new PublicHoliday(secondMondayInAugust, "Heroes' Day", "Heroes' Day", countryCode));
            items.Add(new PublicHoliday(secondTuesdayInAugust, "Defence Forces Day", "Defence Forces Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 22, "Unity Day", "Unity Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 15
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.MS;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var firstMondayInMay    = DateSystem.FindDay(year, Month.May, DayOfWeek.Monday, Occurrence.First);
            var secondMondayInJune  = DateSystem.FindDay(year, Month.June, DayOfWeek.Monday, Occurrence.Second);
            var firstMondayInAugust = DateSystem.FindDay(year, Month.August, DayOfWeek.Monday, Occurrence.First);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 3, 17, "Saint Patrick's Day", "Saint Patrick's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Easter Monday", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(firstMondayInMay, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(50), "Whit Monday", "Whit Monday", countryCode));
            items.Add(new PublicHoliday(secondMondayInJune, "Queen's Birthday", "Queen's Birthday", countryCode));
            items.Add(new PublicHoliday(firstMondayInAugust, "Emancipation Day", "Emancipation Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "St. Stephen's Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 31, "Festival Day", "Festival Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 16
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode = CountryCode.GI;

            var secondMondayInMarch = DateSystem.FindDay(year, Month.March, DayOfWeek.Monday, Occurrence.Second);
            var lastMondayInMay     = DateSystem.FindLastDay(year, Month.May, DayOfWeek.Monday);
            var thirdMondayInJune   = DateSystem.FindDay(year, Month.June, DayOfWeek.Monday, Occurrence.Second);
            var lastMondayInAugust  = DateSystem.FindLastDay(year, Month.August, DayOfWeek.Monday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(secondMondayInMarch, "Commonwealth Day", "Commonwealth Day", countryCode));
            items.Add(this._catholicProvider.GoodFriday("Good Friday", year, countryCode));
            items.Add(this._catholicProvider.EasterMonday("Easter Monday", year, countryCode));
            items.Add(new PublicHoliday(year, 4, 28, "Workers' Memorial Day", "Workers' Memorial Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "May Day Bank Holiday", "May Day Bank Holiday", countryCode));
            items.Add(new PublicHoliday(lastMondayInMay, "Spring Bank Holiday", "Spring Bank Holiday", countryCode));
            items.Add(new PublicHoliday(thirdMondayInJune, "Queen's Birthday", "Queen's Birthday", countryCode));
            items.Add(new PublicHoliday(lastMondayInAugust, "Summer Bank Holiday", "Summer Bank Holiday", countryCode));
            items.Add(new PublicHoliday(year, 9, 10, "Gibraltar National Day", "Gibraltar National Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 17
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.IE;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var firstMondayInMay    = DateSystem.FindDay(year, Month.May, DayOfWeek.Monday, Occurrence.First);
            var firstMondayInJune   = DateSystem.FindDay(year, Month.June, DayOfWeek.Monday, Occurrence.First);
            var firstMondayInAugust = DateSystem.FindDay(year, Month.August, DayOfWeek.Monday, Occurrence.First);
            var lastMondayInOctober = DateSystem.FindLastDay(year, Month.October, DayOfWeek.Monday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Lá Caille", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 3, 17, "Lá Fhéile Pádraig", "Saint Patrick's Day", countryCode, 1903));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Aoine an Chéasta", "Good Friday", countryCode, type: PublicHolidayType.Bank | PublicHolidayType.School));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Luan Cásca", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(firstMondayInMay, "Lá Bealtaine", "May Day", countryCode, 1994));
            items.Add(new PublicHoliday(firstMondayInJune, "Lá Saoire i mí an Mheithimh", "June Holiday", countryCode, 1973));
            items.Add(new PublicHoliday(firstMondayInAugust, "Lá Saoire i mí Lúnasa", "August Holiday", countryCode));
            items.Add(new PublicHoliday(lastMondayInOctober, "Lá Saoire i mí Dheireadh Fómhair", "October Holiday", countryCode, 1977));
            items.Add(new PublicHoliday(year, 12, 25, "Lá Nollag", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Lá Fhéile Stiofáin", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 18
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Botswana
            //https://en.wikipedia.org/wiki/Public_holidays_in_Botswana

            var countryCode  = CountryCode.BW;
            var easterSunday = base.EasterSunday(year);

            var thirdMondayInJuly = DateSystem.FindDay(year, 7, DayOfWeek.Monday, 3);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Easter Monday", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(39), "Ascension Day", "Ascension Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 1, "Sir Seretse Khama Day", "Sir Seretse Khama Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayInJuly, "Presidents' Day", "Presidents' Day", countryCode));
            items.Add(new PublicHoliday(year, 9, 30, "Independence Day", "Independence Day", countryCode));
            items.Add(new PublicHoliday(year, 10, 1, "Botswana Day holiday", "Botswana Day holiday", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 19
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.IS;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var firstDayOfSummer    = DateSystem.FindDay(year, 4, 19, DayOfWeek.Thursday);
            var firstMondayInAugust = DateSystem.FindDay(year, 8, DayOfWeek.Monday, 1);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Nýársdagur", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-3), "Skírdagur", "Maundy Thursday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Föstudagurinn langi", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday, "Páskadagur", "Easter Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Annar í páskum", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(firstDayOfSummer, "Sumardagurinn fyrsti", "First Day of Summer", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Verkalýðsdagurinn", "May Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(39), "Uppstigningardagur", "Ascension Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(49), "Hvítasunnudagur", "Whit Sunday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(50), "Annar í hvítasunnu", "Whit Monday", countryCode));
            items.Add(new PublicHoliday(year, 6, 17, "Þjóðhátíðardagurinn", "Icelandic National Day", countryCode));
            items.Add(new PublicHoliday(firstMondayInAugust, "Frídagur verslunarmanna", "Commerce Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Aðfangadagur", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Jóladagur", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Annar í jólum", "St. Stephen's Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 31, "Gamlársdagur", "New Year's Eve", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Get
        /// </summary>
        /// <param name="year">The year</param>
        /// <returns></returns>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.NI;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var firstThursdayInApril = DateSystem.FindDay(year, 4, DayOfWeek.Thursday, 1);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 1, "Air Force Day", "Air Force Day", countryCode));
            items.Add(new PublicHoliday(firstThursdayInApril, "Holy Thursday", "Holy Thursday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 27, "Army Day", "Army Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 19, "Liberation Day", "Liberation Day", countryCode));
            //Fiesta de Santiago
            //Fiesta de Santa Ana
            //Fiesta de Santo Domingo
            //Crab Soup Day
            items.Add(new PublicHoliday(year, 9, 14, "Battle of San Jacinto", "Battle of San Jacinto", countryCode));
            items.Add(new PublicHoliday(year, 9, 15, "Independence Day", "Independence Day", countryCode));
            items.Add(new PublicHoliday(year, 10, 12, "Indigenous Resistance Day", "Indigenous Resistance Day", countryCode));
            //items.Add(new PublicHoliday(year, 12, 7, "Immaculate Conception", "Immaculate Conception", countryCode)); //León
            items.Add(new PublicHoliday(year, 12, 8, "Immaculate Conception", "Immaculate Conception", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 31, "New Year's Eve", "New Year's Eve", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Get
        /// </summary>
        /// <param name="year">The year</param>
        /// <returns></returns>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode  = CountryCode.IM;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var firstMondayInMay   = DateSystem.FindDay(year, 5, DayOfWeek.Monday, 1);
            var lastMondayInMay    = DateSystem.FindLastDay(year, 5, DayOfWeek.Monday);
            var secondFridayInJune = DateSystem.FindDay(year, 6, DayOfWeek.Friday, 2);
            var lastMondayInAugust = DateSystem.FindLastDay(year, 8, DayOfWeek.Monday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Easter Monday", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(firstMondayInMay, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(lastMondayInMay, "Spring Bank Holiday", "Spring Bank Holiday", countryCode));
            items.Add(new PublicHoliday(secondFridayInJune, "Senior Race Day", "Senior Race Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 5, "Tynwald Day", "Tynwald Day", countryCode));
            items.Add(new PublicHoliday(lastMondayInAugust, "Late Summer Bank Holiday", "Late Summer Bank Holiday", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 22
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Guyana
            //https://en.wikipedia.org/wiki/Public_holidays_in_Guyana

            var countryCode  = CountryCode.GY;
            var easterSunday = base.EasterSunday(year);

            var firstMondayInJuly = DateSystem.FindDay(year, 7, DayOfWeek.Monday, 1);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 23, "Republic Day", "Republic Day", countryCode));
            //TODO:Phagwah ??? (Hindu calendar)
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Good Friday", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "Easter Monday", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 5, "Arrival Day", "Arrival Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 26, "Independence Day", "Independence Day", countryCode));
            items.Add(new PublicHoliday(firstMondayInJuly, "Caricom Day", "Caricom Day", countryCode));
            items.Add(new PublicHoliday(year, 8, 1, "Emancipation Day", "Emancipation Day", countryCode));
            //TODO:Deepavali ??? (Hindu calendar)
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "Boxing Day", countryCode));
            //TODO:Youman-Nabi ??? (Muslim holidays)
            //TODO:Eid-ul-Adha ??? (Muslim holidays)
            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 23
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode = CountryCode.FI;

            var midsummerEve = DateSystem.FindDay(year, Month.June, 19, DayOfWeek.Friday);
            var midsummerDay = DateSystem.FindDay(year, Month.June, 20, DayOfWeek.Saturday);
            var allSaintsDay = DateSystem.FindDayBetween(year, 10, 31, year, 11, 6, DayOfWeek.Saturday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Uudenvuodenpäivä", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 1, 6, "Loppiainen", "Epiphany", countryCode));
            items.Add(this._catholicProvider.GoodFriday("Pitkäperjantai", year, countryCode));
            items.Add(this._catholicProvider.EasterSunday("Pääsiäispäivä", year, countryCode));
            items.Add(this._catholicProvider.EasterMonday("2. pääsiäispäivä", year, countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Vappu", "May Day", countryCode));
            items.Add(this._catholicProvider.AscensionDay("Helatorstai", year, countryCode));
            items.Add(this._catholicProvider.Pentecost("Helluntaipäivä", year, countryCode));
            items.Add(new PublicHoliday(midsummerEve, "Juhannusaatto", "Midsummer Eve", countryCode));
            items.Add(new PublicHoliday(midsummerDay, "Juhannuspäivä", "Midsummer Day", countryCode));
            items.Add(new PublicHoliday(allSaintsDay, "Pyhäinpäivä", "All Saints' Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 6, "Itsenäisyyspäivä", "Independence Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Jouluaatto", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Joulupäivä", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "2. joulupäivä", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 24
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode = CountryCode.CH;

            var firstSundayOfSeptember = DateSystem.FindDay(year, Month.September, DayOfWeek.Sunday, Occurrence.First);
            var thirdMondayOfSeptember = DateSystem.FindDay(year, Month.September, DayOfWeek.Monday, Occurrence.Third);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Neujahr", "New Year's Day", countryCode, 1967));
            items.Add(new PublicHoliday(year, 1, 2, "Berchtoldstag", "St. Berchtold's Day", countryCode, null, new string[] { "CH-ZH", "CH-BE", "CH-LU", "CH-OW", "CH-GL", "CH-ZG", "CH-FR", "CH-SO", "CH-SH", "CH-TG", "CH-VD", "CH-NE", "CH-GE", "CH-JU" }));
            items.Add(new PublicHoliday(year, 1, 6, "Heilige Drei Könige", "Epiphany", countryCode, null, new string[] { "CH-UR", "CH-SZ", "CH-GR", "CH-TI" }));
            items.Add(new PublicHoliday(year, 3, 19, "Josefstag", "Saint Joseph's Day", countryCode, null, new string[] { "CH-LU", "CH-UR", "CH-SZ", "CH-NW", "CH-ZG", "CH-GR", "CH-TI", "CH-VS" }));
            items.Add(this._catholicProvider.GoodFriday("Karfreitag", year, countryCode).SetCounties("CH-ZH", "CH-BE", "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-GL", "CH-ZG", "CH-FR", "CH-SO", "CH-BS", "CH-BL", "CH-SH", "CH-AR", "CH-AI", "CH-SG", "CH-GR", "CH-AG", "CH-TG", "CH-VD", "CH-NE", "CH-GE", "CH-JU"));
            items.Add(this._catholicProvider.WhitMonday("Ostermontag", year, countryCode).SetLaunchYear(1642).SetCounties("CH-ZH", "CH-BE", "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-GL", "CH-ZG", "CH-FR", "CH-SO", "CH-BS", "CH-BL", "CH-SH", "CH-AR", "CH-AI", "CH-SG", "CH-GR", "CH-AG", "CH-TG", "CH-TI", "CH-VD", "CH-NE", "CH-GE", "CH-JU"));
            items.Add(new PublicHoliday(year, 5, 1, "Tag der Arbeit", "Labour Day", countryCode, null, new string[] { "CH-ZH", "CH-FR", "CH-SO", "CH-BS", "CH-BL", "CH-SH", "CH-AG", "CH-TG", "CH-TI", "CH-NE", "CH-JU" }));
            items.Add(this._catholicProvider.AscensionDay("Auffahrt", year, countryCode));
            items.Add(this._catholicProvider.WhitMonday("Pfingstmontag", year, countryCode).SetCounties("CH-ZH", "CH-BE", "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-GL", "CH-ZG", "CH-FR", "CH-SO", "CH-BS", "CH-BL", "CH-SH", "CH-AR", "CH-AI", "CH-SG", "CH-GR", "CH-AG", "CH-TG", "CH-TI", "CH-VD", "CH-NE", "CH-GE", "CH-JU"));
            items.Add(this._catholicProvider.CorpusChristi("Fronleichnam", year, countryCode).SetCounties("CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-ZG", "CH-FR", "CH-SO", "CH-BL", "CH-AI", "CH-GR", "CH-AG", "CH-TI", "CH-VS", "CH-NE", "CH-JU"));
            items.Add(new PublicHoliday(year, 8, 1, "Bundesfeier", "Swiss National Day", countryCode));
            items.Add(new PublicHoliday(year, 8, 15, "Maria Himmelfahrt", "Assumption of the Virgin Mary", countryCode, null, new string[] { "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-ZG", "CH-FR", "CH-SO", "CH-BL", "CH-AI", "CH-GR", "CH-AG", "CH-TI", "CH-VS", "CH-JU" }));
            items.Add(new PublicHoliday(year, 11, 1, "Allerheiligen", "All Saints' Day", countryCode, null, new string[] { "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-GL", "CH-ZG", "CH-FR", "CH-SO", "CH-AI", "CH-SG", "CH-GR", "CH-AG", "CH-TI", "CH-VS", "CH-JU" }));
            items.Add(new PublicHoliday(year, 12, 8, "Mariä Empfängnis", "Immaculate Conception", countryCode, null, new string[] { "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-ZG", "CH-FR", "CH-SO", "CH-AI", "CH-GR", "CH-AG", "CH-TI", "CH-VS" }));
            items.Add(new PublicHoliday(year, 12, 25, "Weihnachten", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Stephanstag", "St. Stephen's Day", countryCode, null, new string[] { "CH-AG", "CH-AI", "CH-AR", "CH-BL", "CH-BS", "CH-BE", "CH-FR", "CH-GL", "CH-GR", "CH-LU", "CH-NW", "CH-OW", "CH-SG", "CH-SH", "CH-SZ", "CH-SO", "CH-TG", "CH-TI", "CH-UR", "CH-ZG", "CH-ZH" }));

            items.Add(new PublicHoliday(firstSundayOfSeptember.AddDays(4), "Jeûne genevois", "Geneva Prayday", countryCode, null, new string[] { "CH-GE" }));
            items.Add(new PublicHoliday(thirdMondayOfSeptember, "Eidgenössischer Dank-, Buss- und Bettag", "Federal Day of Thanksgiving", countryCode, null, new string[] { "CH-ZH", "CH-BE", "CH-LU", "CH-UR", "CH-SZ", "CH-OW", "CH-NW", "CH-GL", "CH-ZG", "CH-FR", "CH-SO", "CH-BS", "CH-BL", "CH-SH", "CH-AR", "CH-AI", "CH-SG", "CH-GR", "CH-AG", "CH-TG", "CH-TI", "CH-VD", "CH-VS", "CH-NE", "CH-JU" }));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 25
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode = CountryCode.GY;

            var firstMondayInJuly = DateSystem.FindDay(year, Month.July, DayOfWeek.Monday, Occurrence.First);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "New Year's Day", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 23, "Republic Day", "Republic Day", countryCode));
            //TODO:Phagwah ??? (Hindu calendar)
            items.Add(this._catholicProvider.GoodFriday("Good Friday", year, countryCode));
            items.Add(this._catholicProvider.EasterMonday("Easter Monday", year, countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 5, "Arrival Day", "Arrival Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 26, "Independence Day", "Independence Day", countryCode));
            items.Add(new PublicHoliday(firstMondayInJuly, "Caricom Day", "Caricom Day", countryCode));
            items.Add(new PublicHoliday(year, 8, 1, "Emancipation Day", "Emancipation Day", countryCode));
            //TODO:Deepavali ??? (Hindu calendar)
            items.Add(new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "Boxing Day", "Boxing Day", countryCode));
            //TODO:Youman-Nabi ??? (Muslim holidays)
            //TODO:Eid-ul-Adha ??? (Muslim holidays)
            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 26
0
        public override IEnumerable <PublicHoliday> Get(int year)
        {
            //Finland
            //https://en.wikipedia.org/wiki/Public_holidays_in_Finland

            var countryCode  = CountryCode.FI;
            var easterSunday = base.EasterSunday(year);

            var midsummerEve = DateSystem.FindDay(year, 6, 19, DayOfWeek.Friday);
            var midsummerDay = DateSystem.FindDay(year, 6, 20, DayOfWeek.Saturday);
            var allSaintsDay = DateSystem.FindDay(year, 11, 19, DayOfWeek.Saturday);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Uudenvuodenpäivä", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 1, 6, "Loppiainen", "Epiphany", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-2), "Pitkäperjantai", "Good Friday", countryCode));
            items.Add(new PublicHoliday(easterSunday, "Pääsiäispäivä", "Easter Sunday", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(1), "2. pääsiäispäivä", "Easter Monday", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Vappu", "May Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(39), "Helatorstai", "Ascension Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(49), "Helluntaipäivä", "Pentecost", countryCode));
            items.Add(new PublicHoliday(midsummerEve, "Juhannusaatto", "Midsummer Eve", countryCode));
            items.Add(new PublicHoliday(midsummerDay, "Juhannuspäivä", "Midsummer Day", countryCode));
            items.Add(new PublicHoliday(allSaintsDay, "Pyhäinpäivä", "All Saints' Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 6, "Itsenäisyyspäivä", "Independence Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Jouluaatto", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Joulupäivä", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 26, "2. joulupäivä", "St. Stephen's Day", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 27
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            //TODO: Add countie support, Feria de la Chinita is only in Zulia...

            var countryCode  = CountryCode.VE;
            var easterSunday = this._catholicProvider.EasterSunday(year);

            var secondSundayInMay = DateSystem.FindDay(year, Month.May, DayOfWeek.Sunday, Occurrence.Second);
            var thirdSundayInJune = DateSystem.FindDay(year, Month.June, DayOfWeek.Sunday, Occurrence.Third);
            var thirdSundayInJuly = DateSystem.FindDay(year, Month.July, DayOfWeek.Sunday, Occurrence.Third);

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(year, 1, 1, "Día de Año Nuevo", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(year, 1, 6, "Día de Reyes", "Epiphany", countryCode));
            items.Add(new PublicHoliday(year, 1, 14, "Día de la Divina Pastora", "Feast of the Divina Pastora", countryCode));
            items.Add(new PublicHoliday(year, 1, 15, "Día del Maestro", "Teacher's Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 12, "Día de la Juventud", "Youth Day", countryCode));
            items.Add(new PublicHoliday(year, 2, 20, "Dia de la Federacion", "Federation Day", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-48), "Carnaval", "Carnival", countryCode));
            items.Add(new PublicHoliday(easterSunday.AddDays(-47), "Carnaval", "Carnival", countryCode));
            items.Add(new PublicHoliday(year, 3, 8, "Dia Internacional de la Mujer", "International Women's Day", countryCode));
            //TODO:Semana Santa
            items.Add(new PublicHoliday(year, 3, 19, "Día de San José", "St Joseph's Day", countryCode));
            items.Add(new PublicHoliday(year, 3, 21, "Día del abolición de la esclavitud", "Slavery Abolition Anniversary", countryCode));
            //items.Add(new PublicHoliday(year, 3, 28, "Día Nacional del Patrimonio Cultural", "National Cultural Patrimonies Day", countryCode)); //not a public holiday
            items.Add(new PublicHoliday(year, 3, 31, "Aniversario del fundacion del San Cristóbal", "Foundation anniversary Day of San Cristóbal, Táchira", countryCode));
            items.Add(new PublicHoliday(year, 4, 19, "Diez y nueve de abril", "Beginning of the Independence Movement", countryCode));
            items.Add(new PublicHoliday(year, 5, 1, "Día del Trabajador", "Labor Day", countryCode));
            items.Add(new PublicHoliday(year, 5, 3, "Día del Cruz del Mayo", "Fiesta de las Cruces", countryCode));
            items.Add(new PublicHoliday(secondSundayInMay, "Día de las Madres", "Mother's Day", countryCode));
            //items.Add(new PublicHoliday(year, 5, 25, "Día del Himno Nacional", "National Anthem Day", countryCode));//not a public holiday
            items.Add(new PublicHoliday(thirdSundayInJune, "Día de los Padres", "Father's Day", countryCode));
            items.Add(new PublicHoliday(year, 6, 24, "Día de San Juan Bautista y aniversario de la Batalla de Carabobo", "Army Day", countryCode));
            items.Add(new PublicHoliday(year, 6, 27, "Día del Periodista y aniversario de la instauración del Decreto de Instrucción pública gratuita y obligatoria", "Journalists' Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 5, "Cinco de julio", "Independence Day", countryCode));
            items.Add(new PublicHoliday(thirdSundayInJuly, "Dia del niño", "Children's Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 24, "Natalicio del Libertador, Dia de la Armada Nacional", "Navy Day", countryCode));
            items.Add(new PublicHoliday(year, 7, 25, "Aniversario del fundacion del Caracas", "Caracas City Foundation Day", countryCode));
            items.Add(new PublicHoliday(year, 8, 3, "Día de la Bandera", "Flag Day", countryCode));
            //items.Add(new PublicHoliday(year, 8, 4, "Día de la Guardia Nacional", "National Guard Day", countryCode));//not a public holiday
            items.Add(new PublicHoliday(year, 9, 8, "Día del Virgen del Valle, aparicion del Virgen del Coromoto", "Birth of the Blessed Virgin Mary and feasts of the Virgen del Valle and Our Lady of Coromoto", countryCode));
            items.Add(new PublicHoliday(year, 9, 24, "Día del Virgen de las Mercedes", "Feast of the Our Lady of Mercy", countryCode));
            items.Add(new PublicHoliday(year, 10, 12, "Día de la Resistencia Indígena", "Day of Indigenous Resistance", countryCode));
            items.Add(new PublicHoliday(year, 11, 1, "Día de Todos los Santos", "All Saints' Day", countryCode));
            items.Add(new PublicHoliday(year, 11, 2, "Día de los fieles difuntos", "All Souls' Day", countryCode));
            items.Add(new PublicHoliday(year, 11, 17, "Feria de la Chinita", "Feria of La Chinita", countryCode));
            items.Add(new PublicHoliday(year, 11, 18, "Feria de la Chinita", "Feria of La Chinita", countryCode));
            items.Add(new PublicHoliday(year, 11, 19, "Feria de la Chinita", "Feria of La Chinita", countryCode));
            items.Add(new PublicHoliday(year, 11, 21, "Día del estudiante universitario", "University Students Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 8, "Inmaculada Concepción, Dia de la Lealtad", "Immaculate Conception, Loyalty Day", countryCode));
            //items.Add(new PublicHoliday(year, 12, 10, "Día de la Aviacion Militar", "Venezuelan Air Force Day", countryCode));//not a public holiday
            items.Add(new PublicHoliday(year, 12, 17, "Aniversario de la muerte de Libertador Simon Bolivar", "Simon Bolivar Memorial Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 24, "Nochebuena", "Christmas Eve", countryCode));
            items.Add(new PublicHoliday(year, 12, 25, "Navidad", "Christmas Day", countryCode));
            items.Add(new PublicHoliday(year, 12, 31, "Nochevieja", "New Year's Eve", countryCode));

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 28
0
        ///<inheritdoc/>
        public IEnumerable <PublicHoliday> Get(int year)
        {
            var countryCode = CountryCode.JP;

            var secondMondayInJanuary  = DateSystem.FindDay(year, Month.January, DayOfWeek.Monday, Occurrence.Second);
            var thirdMondayInJuly      = DateSystem.FindDay(year, Month.July, DayOfWeek.Monday, Occurrence.Third);
            var thirdMondayInSeptember = DateSystem.FindDay(year, Month.September, DayOfWeek.Monday, Occurrence.Third);
            var secondMondayInOctober  = DateSystem.FindDay(year, Month.October, DayOfWeek.Monday, Occurrence.Second);

            var newYearsDay     = new DateTime(year, 1, 1).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var foundationDay   = new DateTime(year, 2, 11).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var showaDay        = new DateTime(year, 4, 29).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var memorialDay     = new DateTime(year, 5, 3).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var greeneryDay     = new DateTime(year, 5, 4).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var childrensDay    = new DateTime(year, 5, 5).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var mountainDay     = new DateTime(year, 8, 11).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var cultureDay      = new DateTime(year, 11, 3).Shift(saturday => saturday, sunday => sunday.AddDays(1));
            var thanksgivingDay = new DateTime(year, 11, 23).Shift(saturday => saturday, sunday => sunday.AddDays(1));

            var items = new List <PublicHoliday>();

            items.Add(new PublicHoliday(newYearsDay, "元日", "New Year's Day", countryCode));
            items.Add(new PublicHoliday(secondMondayInJanuary, "成人の日", "Coming of Age Day", countryCode));
            items.Add(new PublicHoliday(foundationDay, "建国記念の日", "Foundation Day", countryCode));
            items.Add(new PublicHoliday(showaDay, "昭和の日", "Shōwa Day", countryCode));
            items.Add(new PublicHoliday(memorialDay, "憲法記念日", "Constitution Memorial Day", countryCode));
            items.Add(new PublicHoliday(greeneryDay, "みどりの日", "Greenery Day", countryCode));
            items.Add(new PublicHoliday(childrensDay, "こどもの日", "Children's Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayInJuly, "海の日", "Marine Day", countryCode));
            items.Add(new PublicHoliday(mountainDay, "山の日", "Mountain Day", countryCode));
            items.Add(new PublicHoliday(thirdMondayInSeptember, "敬老の日", "Respect for the Aged Day", countryCode));
            items.Add(new PublicHoliday(secondMondayInOctober, "体育の日", "Health and Sports Day", countryCode));
            items.Add(new PublicHoliday(cultureDay, "文化の日", "Culture Day", countryCode));
            items.Add(new PublicHoliday(thanksgivingDay, "勤労感謝の日", "Labour Thanksgiving Day", countryCode));

            //Will change to the date of the new emperor on the death of the current one
            var emperorsBirthday = this.GetEmperorsBirthday(year, countryCode);

            if (emperorsBirthday != null)
            {
                items.Add(emperorsBirthday);
            }

            var vernalEquinoxDay = this.GetVernalEquinox(year, countryCode);

            if (vernalEquinoxDay != null)
            {
                items.Add(vernalEquinoxDay);
            }

            var autumnalEquinoxDay = this.GetAutumnalEquinox(year, countryCode);

            if (autumnalEquinoxDay != null)
            {
                items.Add(autumnalEquinoxDay);
            }

            return(items.OrderBy(o => o.Date));
        }
Ejemplo n.º 29
0
        public void CheckFindDay()
        {
            var result = DateSystem.FindDay(2017, 1, 1, DayOfWeek.Friday);

            Assert.AreEqual(new DateTime(2017, 1, 6), result);

            result = DateSystem.FindDay(2017, 1, 2, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 6), result);

            result = DateSystem.FindDay(2017, 1, 3, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 6), result);

            result = DateSystem.FindDay(2017, 1, 4, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 6), result);

            result = DateSystem.FindDay(2017, 1, 5, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 6), result);

            result = DateSystem.FindDay(2017, 1, 6, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 6), result);

            result = DateSystem.FindDay(2017, 1, 7, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 13), result);

            result = DateSystem.FindDay(2017, 1, 8, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 13), result);

            result = DateSystem.FindDay(2017, 1, 9, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 13), result);

            result = DateSystem.FindDay(2017, 1, 10, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 13), result);

            result = DateSystem.FindDay(2017, 1, 11, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 13), result);

            result = DateSystem.FindDay(2017, 1, 12, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 13), result);

            result = DateSystem.FindDay(2017, 1, 13, DayOfWeek.Friday);
            Assert.AreEqual(new DateTime(2017, 1, 13), result);

            result = DateSystem.FindDay(2017, 1, 14, DayOfWeek.Wednesday);
            Assert.AreEqual(new DateTime(2017, 1, 18), result);

            result = DateSystem.FindDay(2022, 1, 1, DayOfWeek.Monday);
            Assert.AreEqual(new DateTime(2022, 1, 3), result);

            result = DateSystem.FindDay(2022, 1, 1, DayOfWeek.Tuesday);
            Assert.AreEqual(new DateTime(2022, 1, 4), result);
        }
        private PublicHoliday GetEarlyMayBankHoliday(int year, CountryCode countryCode)
        {
            var firstMondayInMay    = DateSystem.FindDay(year, 5, DayOfWeek.Monday, 1);
            var earlyMayBankHoliday = new PublicHoliday(firstMondayInMay, "Early May Bank Holiday", "Early May Bank Holiday", countryCode, 1978);

            if (year == 2020)
            {
                //https://www.bbc.co.uk/news/uk-48565417
                var secondFridayInMay = DateSystem.FindDay(year, 5, DayOfWeek.Friday, 2);
                earlyMayBankHoliday.Date = secondFridayInMay;
            }

            return(earlyMayBankHoliday);
        }