Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turkey - Lunar holidays that cannot be calculated with certainty deactivated #627

Merged
merged 2 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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