Skip to content

Commit 46366fe

Browse files
authored
South Africa - Add Election Day for 2024 (#643)
#641
1 parent 94ca7c0 commit 46366fe

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Nager.Date/HolidayProviders/SouthAfricaHolidayProvider.cs

+17
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
131131
};
132132

133133
holidaySpecifications.AddIfNotNull(this.SpringboksVictory(year));
134+
holidaySpecifications.AddIfNotNull(this.ElectionDay(year));
134135

135136
return holidaySpecifications;
136137
}
@@ -151,6 +152,22 @@ private HolidaySpecification SpringboksVictory(int year)
151152
return null;
152153
}
153154

155+
private HolidaySpecification ElectionDay(int year)
156+
{
157+
if (year == 2024)
158+
{
159+
return new HolidaySpecification
160+
{
161+
Date = new DateTime(year, 5, 29),
162+
EnglishName = "Election Day",
163+
LocalName = "Election Day",
164+
HolidayTypes = HolidayTypes.Public
165+
};
166+
}
167+
168+
return null;
169+
}
170+
154171
/// <inheritdoc/>
155172
public override IEnumerable<string> GetSources()
156173
{

0 commit comments

Comments
 (0)