8000 🇨🇩 Add Holiday Provider for Democratic Republic of the Congo (CD) by SedeoLeos · Pull Request #798 · nager/Nager.Date · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🇨🇩 Add Holiday Provider for Democratic Republic of the Congo (CD) #798

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
using Nager.Date.Models;
using Nager.Date.ReligiousProviders;
using System;
using System.Collections.Generic;

namespace Nager.Date.HolidayProviders
{
/// <summary>
/// Democratic Republic of the Congo HolidayProvider
/// </summary>
internal sealed class DemocraticRepublicOfCongoHolidayProvider : AbstractHolidayProvider
{
private readonly ICatholicProvider _catholicProvider;

/// <summary>
/// DemocraticRepublicOfCongoHolidayProvider
/// </summary>
public DemocraticRepublicOfCongoHolidayProvider() : base(CountryCode.CD)
{

}

/// <inheritdoc/>
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
{

var holidaySpecifications = new List<HolidaySpecification>
{
new HolidaySpecification
{
Date = new DateTime(year, 1, 1),
EnglishName = "New Year's Day",
LocalName = "New Year's Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 1, 4),
EnglishName = "Martyrs Day",
LocalName = "Martyrs Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 1, 16),
EnglishName = "Laurent-Désiré Kabila Assassination",
LocalName = "Laurent-Désiré Kabila Assassination",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 1, 17),
EnglishName = "Patrice Lumumba Assassination",
LocalName = "Patrice Lumumba Assassination",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 4, 6),
EnglishName = "Kimbangu's Day",
LocalName = "Kimbangu's Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 5, 1),
EnglishName = "Labour Day",
LocalName = "Labour Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 5, 17),
EnglishName = "Liberation Day",
LocalName = "Liberation Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 6, 30),
EnglishName = "Independence Day",
LocalName = "Independence Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 8, 1),
EnglishName = "Parents' Day",
LocalName = "Parents' Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 8, 2),
EnglishName = "Congolese Genocide Day",
LocalName = "Congolese Genocide Day",
HolidayTypes = HolidayTypes.Public,
},
new HolidaySpecification
{
Date = new DateTime(year, 12, 25),
EnglishName = "Christmas Day",
LocalName = "Christmas Day",
HolidayTypes = HolidayTypes.Public,
}

};

return holidaySpecifications;
}

/// <inheritdoc/>
public override IEnumerable<string> GetSources()
{
return
[
"https://en.wikipedia.org/wiki/Public_holidays_in_the_Democratic_Republic_of_the_Congo",
"https://www.officeholidays.com/countries/dr-congo"
];
}
}
}
1 change: 1 addition & 0 deletions src/Nager.Date/HolidaySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public static class HolidaySystem
{ CountryCode.BY, new Lazy<IHolidayProvider>(() => new BelarusHolidayProvider(_orthodoxProvider))},
{ CountryCode.BZ, new Lazy<IHolidayProvider>(() => new BelizeHolidayProvider(_catholicProvider))},
{ CountryCode.CA, new Lazy<IHolidayProvider>(() => new CanadaHolidayProvider(_catholicProvider))},
{ CountryCode.CD, new Lazy<IHolidayProvider>(() => new DemocraticRepublicOfCongoHolidayProvider())},
{ CountryCode.CH, new Lazy<IHolidayProvider>(() => new SwitzerlandHolidayProvider(_catholicProvider))},
{ CountryCode.CL, new Lazy<IHolidayProvider>(() => new ChileHolidayProvider(_catholicProvider))},
{ CountryCode.CN, new Lazy<IHolidayProvider>(() => new ChinaHolidayProvider())},
Expand Down
0