Skip to content

Commit

Permalink
Turkey - Lunar holidays that cannot be calculated with certainty deac…
Browse files Browse the repository at this point in the history
…tivated (#627)

* Holidays that cannot be calculated with certainty deactivated

#611
  • Loading branch information
tinohager authored Mar 28, 2024
1 parent 86093a6 commit 7edb2f4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 31 deletions.
57 changes: 28 additions & 29 deletions src/Nager.Date.UnitTest/Countries/TurkeyTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public class TurkeyTest
[DataRow(1, 1)]
[DataRow(4, 23)]
[DataRow(5, 1)]
[DataRow(5, 2)]
[DataRow(5, 3)]
[DataRow(5, 4)]
//[DataRow(5, 2)]
//[DataRow(5, 3)]
//[DataRow(5, 4)]
[DataRow(5, 19)]
[DataRow(7, 9)]
[DataRow(7, 10)]
[DataRow(7, 11)]
[DataRow(7, 12)]
//[DataRow(7, 9)]
//[DataRow(7, 10)]
//[DataRow(7, 11)]
//[DataRow(7, 12)]
[DataRow(7, 15)]
[DataRow(8, 30)]
[DataRow(10, 29)]
Expand All @@ -38,14 +38,14 @@ public void TestHolidays2022(int month, int day)
[DataRow(4, 23)]
[DataRow(5, 1)]
[DataRow(5, 19)]
[DataRow(5, 24)]
[DataRow(5, 25)]
[DataRow(5, 26)]
//[DataRow(5, 24)]
//[DataRow(5, 25)]
//[DataRow(5, 26)]
[DataRow(7, 15)]
[DataRow(7, 31)]
[DataRow(8, 1)]
[DataRow(8, 2)]
[DataRow(8, 3)]
//[DataRow(7, 31)]
//[DataRow(8, 1)]
//[DataRow(8, 2)]
//[DataRow(8, 3)]
[DataRow(8, 30)]
[DataRow(10, 29)]
public void TestHolidays2020(int month, int day)
Expand All @@ -63,15 +63,15 @@ public void TestHolidays2020(int month, int day)
[DataRow(4, 23)]
[DataRow(5, 1)]
[DataRow(5, 19)]
[DataRow(6, 25)]
[DataRow(6, 26)]
[DataRow(6, 27)]
//[DataRow(6, 25)]
//[DataRow(6, 26)]
//[DataRow(6, 27)]
[DataRow(7, 15)]
[DataRow(8, 30)]
[DataRow(9, 1)]
[DataRow(9, 2)]
[DataRow(9, 3)]
[DataRow(9, 4)]
//[DataRow(9, 1)]
//[DataRow(9, 2)]
//[DataRow(9, 3)]
//[DataRow(9, 4)]
[DataRow(10, 29)]
public void TestHolidays2017(int month, int day)
{
Expand All @@ -83,20 +83,19 @@ public void TestHolidays2017(int month, int day)
Assert.IsTrue(isHolidayFound, $"{holiday.ToString("D")} is not a holiday");
}


[DataTestMethod]
[DataRow(1, 1)]
[DataRow(4, 23)]
[DataRow(5, 1)]
[DataRow(5, 19)]
[DataRow(7, 28)]
[DataRow(7, 29)]
[DataRow(7, 30)]
//[DataRow(7, 28)]
//[DataRow(7, 29)]
//[DataRow(7, 30)]
[DataRow(8, 30)]
[DataRow(10, 4)]
[DataRow(10, 5)]
[DataRow(10, 6)]
[DataRow(10, 7)]
//[DataRow(10, 4)]
//[DataRow(10, 5)]
//[DataRow(10, 6)]
//[DataRow(10, 7)]
[DataRow(10, 29)]
public void TestHolidays2014(int month, int day)
{
Expand Down
6 changes: 4 additions & 2 deletions src/Nager.Date/HolidayProviders/TurkeyHolidayProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ protected override IEnumerable<HolidaySpecification> GetHolidaySpecifications(in
};

holidaySpecifications.AddIfNotNull(this.DemocracyAndNationalUnityDay(year));
holidaySpecifications.AddRange(this.GetEidAlFitr(year));
holidaySpecifications.AddRange(this.GetEidAlAdha(year));

//INFO: Cannot be calculated with certainty in advance, the exact date is determined by the lunar observations
//holidaySpecifications.AddRange(this.GetEidAlFitr(year));
//holidaySpecifications.AddRange(this.GetEidAlAdha(year));

return holidaySpecifications;

Expand Down

0 comments on commit 7edb2f4

Please sign in to comment.