Skip to content

Commit

Permalink
South Africa - Add Election Day for 2024 (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager authored Apr 28, 2024
1 parent 94ca7c0 commit 46366fe
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Nager.Date/HolidayProviders/SouthAfricaHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
};

holidaySpecifications.AddIfNotNull(this.SpringboksVictory(year));
holidaySpecifications.AddIfNotNull(this.ElectionDay(year));

return holidaySpecifications;
}
Expand All @@ -151,6 +152,22 @@ private HolidaySpecification SpringboksVictory(int year)
return null;
}

private HolidaySpecification ElectionDay(int year)
{
if (year == 2024)
{
return new HolidaySpecification
{
Date = new DateTime(year, 5, 29),
EnglishName = "Election Day",
LocalName = "Election Day",
HolidayTypes = HolidayTypes.Public
};
}

return null;
}

/// <inheritdoc/>
public override IEnumerable<string> GetSources()
{
Expand Down

0 comments on commit 46366fe

Please sign in to comment.