profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/samtrion/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Martin Stühmer samtrion Cologne Bonn Region, Germany Cloud Solution Architect, Father of Two, Human

nager/Nager.Date 632

:earth_americas: Worldwide public holiday

samtrion/CompactDrawers 1

This is an addon pack for the Storage Drawers mod.

startedCybermaxs/awesome-analyzers

started time in 5 hours

push eventsamtrion/samtrion

Martin Stühmer

commit sha 0e124658683f7bd90e1c4fcdc2f0dca8276e4d67

Update README.md

view details

push time in 9 hours

PublicEvent

startedbitfaster/BitFaster.Caching

started time in 6 days

startedrr-wfm/MSBuild.Sdk.SqlProj

started time in 9 days

starteddotnet/aspnet-api-versioning

started time in 9 days

startedAArnott/CSharpIsNull

started time in 9 days

startedbadamczewski/PowerUp

started time in 13 days

startedactions/virtual-environments

started time in 17 days

Pull request review commentnager/Nager.Date

Chile - some holidays are modified

 public IEnumerable<PublicHoliday> Get(int year)             items.Add(new PublicHoliday(year, 6, 26, "San Pedro y San Pablo", "Saint Peter and Saint Paul", countryCode));             //Presidential and Congress Primary Elections             items.Add(new PublicHoliday(year, 7, 16, "Virgen del Carmen", "Our Lady of Mount Carmel", countryCode));-            items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));-            items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));+            //items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));+            //items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));             items.Add(new PublicHoliday(year, 8, 15, "Asunción de la Virgen", "Assumption of Mary", countryCode));             //items.Add(new PublicHoliday(year, 8, 20, "Nacimiento del Prócer de la Independencia", "Nativity of Liberator Bernardo O'Higgins", countryCode)); //Only Valid in a communes+            items.Add(new PublicHoliday(year, 9, 17, "Fiestas Patrias	", "National holiday", countryCode));

Since when is this holiday valid? What are the references for it?

Marcelo366

comment created time in 22 days

Pull request review commentnager/Nager.Date

Chile - some holidays are modified

 public IEnumerable<PublicHoliday> Get(int year)             items.Add(new PublicHoliday(year, 6, 26, "San Pedro y San Pablo", "Saint Peter and Saint Paul", countryCode));             //Presidential and Congress Primary Elections             items.Add(new PublicHoliday(year, 7, 16, "Virgen del Carmen", "Our Lady of Mount Carmel", countryCode));-            items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));

Why are these holidays removed? Are these historical holidays, if so until when?

Marcelo366

comment created time in 22 days

Pull request review commentnager/Nager.Date

Chile - some holidays are modified

 public IEnumerable<PublicHoliday> Get(int year)             items.Add(new PublicHoliday(year, 6, 26, "San Pedro y San Pablo", "Saint Peter and Saint Paul", countryCode));             //Presidential and Congress Primary Elections             items.Add(new PublicHoliday(year, 7, 16, "Virgen del Carmen", "Our Lady of Mount Carmel", countryCode));-            items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));-            items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));+            //items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));+            //items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));             items.Add(new PublicHoliday(year, 8, 15, "Asunción de la Virgen", "Assumption of Mary", countryCode));             //items.Add(new PublicHoliday(year, 8, 20, "Nacimiento del Prócer de la Independencia", "Nativity of Liberator Bernardo O'Higgins", countryCode)); //Only Valid in a communes+            items.Add(new PublicHoliday(year, 9, 17, "Fiestas Patrias	", "National holiday", countryCode));             items.Add(new PublicHoliday(year, 9, 18, "Fiestas Patrias", "National holiday", countryCode));             items.Add(new PublicHoliday(year, 9, 19, "Día de las Glorias del Ejército", "Army Day", countryCode));-            items.Add(new PublicHoliday(year, 9, 20, "Feast of La Pampilla", "Fiesta de La Pampilla", countryCode, null, new string[] { "CL-CO" }));-            items.Add(new PublicHoliday(year, 9, 21, "Toma de posesión del estrecho de Magallanes", "National Possession of the Strait of Magellan", countryCode, null, new string[] { "CL-MA" }));-            items.Add(new PublicHoliday(year, 10, 2, "Aniversario de la Creación de la XIV Región de Los Ríos", "Los Ríos Region Anniversary", countryCode, null, new string[] { "CL-LR" }));-            items.Add(new PublicHoliday(year, 10, 9, "Día del Descubrimiento de Dos Mundos", "Columbus Day", countryCode));-            items.Add(new PublicHoliday(year, 10, 27, "Día Nacional de las Iglesias Evangélicas y Protestantes", "Reformation Day", countryCode));+            //items.Add(new PublicHoliday(year, 9, 20, "Feast of La Pampilla", "Fiesta de La Pampilla", countryCode, null, new string[] { "CL-CO" }));+            //items.Add(new PublicHoliday(year, 9, 21, "Toma de posesión del estrecho de Magallanes", "National Possession of the Strait of Magellan", countryCode, null, new string[] { "CL-MA" }));+            //items.Add(new PublicHoliday(year, 10, 2, "Aniversario de la Creación de la XIV Región de Los Ríos", "Los Ríos Region Anniversary", countryCode, null, new string[] { "CL-LR" }));+            items.Add(new PublicHoliday(year, 10, 11, "Encuentro de Dos Mundos", "Columbus Day", countryCode));+            items.Add(new PublicHoliday(year, 10, 31, "Día Nacional de las Iglesias Evangélicas y Protestantes", "Reformation Day", countryCode));             items.Add(new PublicHoliday(year, 11, 1, "Día de Todos los Santos", "All Saints", countryCode));-            items.Add(new PublicHoliday(year, 11, 19, "Elecciones presidencial, congresistas y regionales", "Presidential, parliamentary and regional elections", countryCode));

Is this date change valid from the current year? Then please include a corresponding year condition.

Marcelo366

comment created time in 22 days

Pull request review commentnager/Nager.Date

Chile - some holidays are modified

 public IEnumerable<PublicHoliday> Get(int year)             items.Add(new PublicHoliday(year, 6, 26, "San Pedro y San Pablo", "Saint Peter and Saint Paul", countryCode));             //Presidential and Congress Primary Elections             items.Add(new PublicHoliday(year, 7, 16, "Virgen del Carmen", "Our Lady of Mount Carmel", countryCode));-            items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));-            items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));+            //items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));+            //items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));             items.Add(new PublicHoliday(year, 8, 15, "Asunción de la Virgen", "Assumption of Mary", countryCode));             //items.Add(new PublicHoliday(year, 8, 20, "Nacimiento del Prócer de la Independencia", "Nativity of Liberator Bernardo O'Higgins", countryCode)); //Only Valid in a communes+            items.Add(new PublicHoliday(year, 9, 17, "Fiestas Patrias	", "National holiday", countryCode));             items.Add(new PublicHoliday(year, 9, 18, "Fiestas Patrias", "National holiday", countryCode));             items.Add(new PublicHoliday(year, 9, 19, "Día de las Glorias del Ejército", "Army Day", countryCode));-            items.Add(new PublicHoliday(year, 9, 20, "Feast of La Pampilla", "Fiesta de La Pampilla", countryCode, null, new string[] { "CL-CO" }));-            items.Add(new PublicHoliday(year, 9, 21, "Toma de posesión del estrecho de Magallanes", "National Possession of the Strait of Magellan", countryCode, null, new string[] { "CL-MA" }));-            items.Add(new PublicHoliday(year, 10, 2, "Aniversario de la Creación de la XIV Región de Los Ríos", "Los Ríos Region Anniversary", countryCode, null, new string[] { "CL-LR" }));-            items.Add(new PublicHoliday(year, 10, 9, "Día del Descubrimiento de Dos Mundos", "Columbus Day", countryCode));-            items.Add(new PublicHoliday(year, 10, 27, "Día Nacional de las Iglesias Evangélicas y Protestantes", "Reformation Day", countryCode));+            //items.Add(new PublicHoliday(year, 9, 20, "Feast of La Pampilla", "Fiesta de La Pampilla", countryCode, null, new string[] { "CL-CO" }));+            //items.Add(new PublicHoliday(year, 9, 21, "Toma de posesión del estrecho de Magallanes", "National Possession of the Strait of Magellan", countryCode, null, new string[] { "CL-MA" }));

Why are these holidays removed? Are these historical holidays, if so until when?

Marcelo366

comment created time in 22 days

PullRequestReviewEvent

Pull request review commentnager/Nager.Date

Chile - some holidays are modified

 public IEnumerable<PublicHoliday> Get(int year)             items.Add(new PublicHoliday(year, 6, 26, "San Pedro y San Pablo", "Saint Peter and Saint Paul", countryCode));             //Presidential and Congress Primary Elections             items.Add(new PublicHoliday(year, 7, 16, "Virgen del Carmen", "Our Lady of Mount Carmel", countryCode));-            items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));-            items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));+            //items.Add(new PublicHoliday(year, 8, 10, "San Lorenzo de Tarapacá", "Saint Lawrence", countryCode, null, new string[] { "CL-TA" }));+            //items.Add(new PublicHoliday(year, 8, 10, "Día del Minero", "National Miner's Day", countryCode, null, new string[] { "CL-AT" }));             items.Add(new PublicHoliday(year, 8, 15, "Asunción de la Virgen", "Assumption of Mary", countryCode));             //items.Add(new PublicHoliday(year, 8, 20, "Nacimiento del Prócer de la Independencia", "Nativity of Liberator Bernardo O'Higgins", countryCode)); //Only Valid in a communes+            items.Add(new PublicHoliday(year, 9, 17, "Fiestas Patrias	", "National holiday", countryCode));             items.Add(new PublicHoliday(year, 9, 18, "Fiestas Patrias", "National holiday", countryCode));             items.Add(new PublicHoliday(year, 9, 19, "Día de las Glorias del Ejército", "Army Day", countryCode));-            items.Add(new PublicHoliday(year, 9, 20, "Feast of La Pampilla", "Fiesta de La Pampilla", countryCode, null, new string[] { "CL-CO" }));-            items.Add(new PublicHoliday(year, 9, 21, "Toma de posesión del estrecho de Magallanes", "National Possession of the Strait of Magellan", countryCode, null, new string[] { "CL-MA" }));-            items.Add(new PublicHoliday(year, 10, 2, "Aniversario de la Creación de la XIV Región de Los Ríos", "Los Ríos Region Anniversary", countryCode, null, new string[] { "CL-LR" }));-            items.Add(new PublicHoliday(year, 10, 9, "Día del Descubrimiento de Dos Mundos", "Columbus Day", countryCode));-            items.Add(new PublicHoliday(year, 10, 27, "Día Nacional de las Iglesias Evangélicas y Protestantes", "Reformation Day", countryCode));+            //items.Add(new PublicHoliday(year, 9, 20, "Feast of La Pampilla", "Fiesta de La Pampilla", countryCode, null, new string[] { "CL-CO" }));

Why are these holidays removed? Are these historical holidays, if so until when?

Marcelo366

comment created time in 22 days

PullRequestReviewEvent

Pull request review commentnager/Nager.Date

Add SingaporeProvider

 public IEnumerable<PublicHoliday> Get(int year)             var items = new List<PublicHoliday>             {                 new PublicHoliday(year, 1, 1, "New Year’s Day", "New Year’s Day", countryCode),-                new PublicHoliday(year, 2, 1, "Chinese New Year", "Chinese New Year", countryCode),-                new PublicHoliday(year, 2, 2, "Chinese New Year", "Chinese New Year", countryCode),                 new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode),                 new PublicHoliday(year, 8, 9, "National Day", "National Day", countryCode),                 new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode),             }; +            // Good Friday+            items.Add(this._catholicProvider.GoodFriday("Good Friday", year, countryCode));++            // Chinese New Year, 2 days+            if (year > 1901 && year < 2100)+            {+                //LunisolarCalendar .net implementation only valid are between 1901 and 2100, inclusive.+                //https://github.com/dotnet/coreclr/blob/master/src/mscorlib/shared/System/Globalization/ChineseLunisolarCalendar.cs+                //https://stackoverflow.com/questions/30719176/algorithm-to-find-the-gregorian-date-of-the-chinese-new-year-of-a-certain-gregor+                var chineseCalendar = new ChineseLunisolarCalendar();

I think you are missing the convertion back to gregorian calendar, based on your link

YipingRuan

comment created time in 22 days

PullRequestReviewEvent
PullRequestReviewEvent

startedspectreconsole/errata

started time in 25 days

startedCysharp/Ulid

started time in a month

Pull request review commentnager/Nager.Date

Add SingaporeProvider

+using Microsoft.VisualStudio.TestTools.UnitTesting;+using Nager.Date.Extensions;+using System;+using System.Linq;++namespace Nager.Date.UnitTest.Country+{+    [TestClass]+    public class SingaporeTest+    {+        [TestMethod]+        public void TestSingapore()+        {+            var publicHolidays = DateSystem.GetPublicHolidays(2022, CountryCode.SG).ToArray();++            Assert.AreEqual("New Year’s Day", publicHolidays[0].Name);

Please add more tests, especially for the years with optional holidays like 2022

YipingRuan

comment created time in a month

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentnager/Nager.Date

Add SingaporeProvider

+using Nager.Date.Contract;+using Nager.Date.Model;+using System.Collections.Generic;+using System.Linq;++namespace Nager.Date.PublicHolidays+{+    /// <summary>+    /// Singapore+    /// </summary>+    public class SingaporeProvider : IPublicHolidayProvider+    {+        /// <summary>+        /// SingaporeProvider+        /// </summary>+        public SingaporeProvider()+        {+        }++        ///<inheritdoc/>+        public IEnumerable<PublicHoliday> Get(int year)+        {+            var countryCode = CountryCode.SG;++            var items = new List<PublicHoliday>+            {+                new PublicHoliday(year, 1, 1, "New Year’s Day", "New Year’s Day", countryCode),+                new PublicHoliday(year, 2, 1, "Chinese New Year", "Chinese New Year", countryCode),+                new PublicHoliday(year, 2, 2, "Chinese New Year", "Chinese New Year", countryCode),+                new PublicHoliday(year, 4, 15, "Good Friday", "Good Friday", countryCode),+                new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode),+                new PublicHoliday(year, 8, 9, "National Day", "National Day", countryCode),+                new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode),+            };++            switch (year)+            {+                case 2022:+                    items.Add(new PublicHoliday(year, 5, 2, "Hari Raya Puasa", "Hari Raya Puasa", countryCode));+                    items.Add(new PublicHoliday(year, 5, 15, "Vesak Day", "Vesak Day", countryCode));+                    items.Add(new PublicHoliday(year, 7, 9, "Hari Raya Haji", "Hari Raya Haji", countryCode));+                    items.Add(new PublicHoliday(year, 10, 24, "Deepavali", "Deepavali", countryCode));+                    break;+                default:+                    break;+            }++            return items.OrderBy(o => o.Date);+        }++        ///<inheritdoc/>+        public IEnumerable<string> GetSources()+        {+            return new string[]+            {+                "https://www.mom.gov.sg/employment-practices/public-holidays#Year-2022"

We try to at least support the last years and the next x years.

YipingRuan

comment created time in a month

PullRequestReviewEvent

Pull request review commentnager/Nager.Date

Add SingaporeProvider

+using Nager.Date.Contract;+using Nager.Date.Model;+using System.Collections.Generic;+using System.Linq;++namespace Nager.Date.PublicHolidays+{+    /// <summary>+    /// Singapore+    /// </summary>+    public class SingaporeProvider : IPublicHolidayProvider+    {+        /// <summary>+        /// SingaporeProvider+        /// </summary>+        public SingaporeProvider()+        {+        }++        ///<inheritdoc/>+        public IEnumerable<PublicHoliday> Get(int year)+        {+            var countryCode = CountryCode.SG;++            var items = new List<PublicHoliday>+            {+                new PublicHoliday(year, 1, 1, "New Year’s Day", "New Year’s Day", countryCode),+                new PublicHoliday(year, 2, 1, "Chinese New Year", "Chinese New Year", countryCode),+                new PublicHoliday(year, 2, 2, "Chinese New Year", "Chinese New Year", countryCode),+                new PublicHoliday(year, 4, 15, "Good Friday", "Good Friday", countryCode),+                new PublicHoliday(year, 5, 1, "Labour Day", "Labour Day", countryCode),+                new PublicHoliday(year, 8, 9, "National Day", "National Day", countryCode),+                new PublicHoliday(year, 12, 25, "Christmas Day", "Christmas Day", countryCode),+            };++            switch (year)+            {+                case 2022:+                    items.Add(new PublicHoliday(year, 5, 2, "Hari Raya Puasa", "Hari Raya Puasa", countryCode));+                    items.Add(new PublicHoliday(year, 5, 15, "Vesak Day", "Vesak Day", countryCode));+                    items.Add(new PublicHoliday(year, 7, 9, "Hari Raya Haji", "Hari Raya Haji", countryCode));+                    items.Add(new PublicHoliday(year, 10, 24, "Deepavali", "Deepavali", countryCode));+                    break;+                default:+                    break;+            }

I'm not a fan of this. What about all the other years??

YipingRuan

comment created time in a month

PullRequestReviewEvent

pull request commentnager/Nager.Date

Add Hong Kong

@tinohager Is here anything open? or can we merge

tinohager

comment created time in a month

push eventnager/Nager.Date

Martin Stühmer

commit sha 2b42aa4246140f8cdb6a54aa8ac6041ef067e3bd

Update issue templates (#281) * Update issue templates * Delete ISSUE_TEMPLATE.md * resolved feedback * updated text

view details

push time in a month