Skip to content

Commit

Permalink
Greece - Fix Labour Day for 2024 (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Apr 28, 2024
1 parent 764c1ba commit 94ca7c0
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions src/Nager.Date/HolidayProviders/GreeceHolidayProvider.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Nager.Date.Extensions;
using Nager.Date.Models;
using Nager.Date.ReligiousProviders;
using System;
Expand Down Expand Up @@ -58,13 +59,6 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
HolidayTypes = HolidayTypes.Public
},
new HolidaySpecification
{
Date = new DateTime(year, 5, 1),
EnglishName = "Labour Day",
LocalName = "Εργατική Πρωτομαγιά",
HolidayTypes = HolidayTypes.Public
},
new HolidaySpecification
{
Date = new DateTime(year, 8, 15),
EnglishName = "Assumption Day",
Expand Down Expand Up @@ -106,9 +100,37 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
this._orthodoxProvider.WhitMonday("Δευτέρα Πεντηκοστής", year)
};

holidaySpecifications.AddIfNotNull(this.LabourDay(year));

return holidaySpecifications;
}

private HolidaySpecification LabourDay(int year)
{
var englishName = "Labour Day";
var localName = "Εργατική Πρωτομαγιά";

// Government Gazette B' 1406/4.3.2024 - 15102
if (year == 2024)
{
return new HolidaySpecification
{
Date = new DateTime(year, 5, 7),
EnglishName = englishName,
LocalName = localName,
HolidayTypes = HolidayTypes.Public
};
}

return new HolidaySpecification
{
Date = new DateTime(year, 5, 1),
EnglishName = englishName,
LocalName = localName,
HolidayTypes = HolidayTypes.Public
};
}

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

0 comments on commit 94ca7c0

Please sign in to comment.