Skip to content

Commit ee1e1e7

Browse files
SedeoLeostinohager
andauthored
🇨🇩 Add Holiday Provider for Democratic Republic of the Congo (CD) (#798)
* feat(cd): add official public holidays for DR Congo (RDC) Includes fixed-date holidays such as Martyrs' Day, Kimbangu's Day, Independence Day, and Parents' Day. Corrected country code to CD. Cleaned up duplicated entries and formatting issues. - #796 * fix(cd): Corrected the country code from CG to CD * fix(cd): remove All Saints' Day * Update DemocraticRepublicOfCongoHolidayProvider.cs --------- Co-authored-by: Tino Hager <[email protected]>
1 parent 059615c commit ee1e1e7

2 files changed

Lines changed: 117 additions & 0 deletions

File tree

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
using Nager.Date.Models;
2+
using System;
3+
using System.Collections.Generic;
4+
5+
namespace Nager.Date.HolidayProviders
6+
{
7+
/// <summary>
8+
/// Democratic Republic of the Congo HolidayProvider
9+
/// </summary>
10+
internal sealed class DemocraticRepublicOfCongoHolidayProvider : AbstractHolidayProvider
11+
{
12+
/// <summary>
13+
/// Democratic Republic of the Congo HolidayProvider
14+
/// </summary>
15+
public DemocraticRepublicOfCongoHolidayProvider() : base(CountryCode.CD)
16+
{
17+
}
18+
19+
/// <inheritdoc/>
20+
protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(int year)
21+
{
22+
var holidaySpecifications = new List<HolidaySpecification>
23+
{
24+
new HolidaySpecification
25+
{
26+
Date = new DateTime(year, 1, 1),
27+
EnglishName = "New Year's Day",
28+
LocalName = "New Year's Day",
29+
HolidayTypes = HolidayTypes.Public,
30+
},
31+
new HolidaySpecification
32+
{
33+
Date = new DateTime(year, 1, 4),
34+
EnglishName = "Martyrs Day",
35+
LocalName = "Martyrs Day",
36+
HolidayTypes = HolidayTypes.Public,
37+
},
38+
new HolidaySpecification
39+
{
40+
Date = new DateTime(year, 1, 16),
41+
EnglishName = "Laurent-Désiré Kabila Assassination",
42+
LocalName = "Laurent-Désiré Kabila Assassination",
43+
HolidayTypes = HolidayTypes.Public,
44+
},
45+
new HolidaySpecification
46+
{
47+
Date = new DateTime(year, 1, 17),
48+
EnglishName = "Patrice Lumumba Assassination",
49+
LocalName = "Patrice Lumumba Assassination",
50+
HolidayTypes = HolidayTypes.Public,
51+
},
52+
new HolidaySpecification
53+
{
54+
Date = new DateTime(year, 4, 6),
55+
EnglishName = "Kimbangu's Day",
56+
LocalName = "Kimbangu's Day",
57+
HolidayTypes = HolidayTypes.Public,
58+
},
59+
new HolidaySpecification
60+
{
61+
Date = new DateTime(year, 5, 1),
62+
EnglishName = "Labour Day",
63+
LocalName = "Labour Day",
64+
HolidayTypes = HolidayTypes.Public,
65+
},
66+
new HolidaySpecification
67+
{
68+
Date = new DateTime(year, 5, 17),
69+
EnglishName = "Liberation Day",
70+
LocalName = "Liberation Day",
71+
HolidayTypes = HolidayTypes.Public,
72+
},
73+
new HolidaySpecification
74+
{
75+
Date = new DateTime(year, 6, 30),
76+
EnglishName = "Independence Day",
77+
LocalName = "Independence Day",
78+
HolidayTypes = HolidayTypes.Public,
79+
},
80+
new HolidaySpecification
81+
{
82+
Date = new DateTime(year, 8, 1),
83+
EnglishName = "Parents' Day",
84+
LocalName = "Parents' Day",
85+
HolidayTypes = HolidayTypes.Public,
86+
},
87+
new HolidaySpecification
88+
{
89+
Date = new DateTime(year, 8, 2),
90+
EnglishName = "Congolese Genocide Day",
91+
LocalName = "Congolese Genocide Day",
92+
HolidayTypes = HolidayTypes.Public,
93+
},
94+
new HolidaySpecification
95+
{
96+
Date = new DateTime(year, 12, 25),
97+
EnglishName = "Christmas Day",
98+
LocalName = "Christmas Day",
99+
HolidayTypes = HolidayTypes.Public,
100+
}
101+
};
102+
103+
return holidaySpecifications;
104+
}
105+
106+
/// <inheritdoc/>
107+
public override IEnumerable<string> GetSources()
108+
{
109+
return
110+
[
111+
"https://en.wikipedia.org/wiki/Public_holidays_in_the_Democratic_Republic_of_the_Congo",
112+
"https://www.officeholidays.com/countries/dr-congo"
113+
];
114+
}
115+
}
116+
}

src/Nager.Date/HolidaySystem.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public static class HolidaySystem
4242
{ CountryCode.BY, new Lazy<IHolidayProvider>(() => new BelarusHolidayProvider(_orthodoxProvider))},
4343
{ CountryCode.BZ, new Lazy<IHolidayProvider>(() => new BelizeHolidayProvider(_catholicProvider))},
4444
{ CountryCode.CA, new Lazy<IHolidayProvider>(() => new CanadaHolidayProvider(_catholicProvider))},
45+
{ CountryCode.CD, new Lazy<IHolidayProvider>(() => new DemocraticRepublicOfCongoHolidayProvider())},
4546
{ CountryCode.CG, new Lazy<IHolidayProvider>(() => new RepublicOfCongoHolidayProvider(_catholicProvider))},
4647
{ CountryCode.CH, new Lazy<IHolidayProvider>(() => new SwitzerlandHolidayProvider(_catholicProvider))},
4748
{ CountryCode.CL, new Lazy<IHolidayProvider>(() => new ChileHolidayProvider(_catholicProvider))},

0 commit comments

Comments
 (0)