Skip to content

Commit

Permalink
Singapore - Polling Day
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Aug 27, 2023
1 parent b65aac1 commit c50f24e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Nager.Date/PublicHolidays/SingaporeProvider.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using Nager.Date.Contract;
using Nager.Date.Extensions;
using Nager.Date.Model;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using static System.Collections.Specialized.BitVector32;

namespace Nager.Date.PublicHolidays
{
Expand Down Expand Up @@ -47,6 +49,7 @@ public IEnumerable<PublicHoliday> GetHolidays(int year)
items.AddIfNotNull(this.VesakDay(year, countryCode));
items.AddIfNotNull(this.HariRayaHaji(year, countryCode));
items.AddIfNotNull(this.Deepavali(year, countryCode));
items.AddIfNotNull(this.PollingDay(year, countryCode));

return items.OrderBy(o => o.Date);
}
Expand Down Expand Up @@ -179,6 +182,15 @@ private PublicHoliday Deepavali(int year, CountryCode countryCode)
default:
break;
}
return null;
}

private PublicHoliday PollingDay(int year, CountryCode countryCode)
{
if (year == 2023)
{
return new PublicHoliday(year, 9, 1, "Polling Day", "Polling Day", countryCode);
}

return null;
}
Expand Down

0 comments on commit c50f24e

Please sign in to comment.