From 39e7979ad59a3c4cabf7b1fa510f954350f8abb2 Mon Sep 17 00:00:00 2001 From: Tino Hager Date: Thu, 28 Mar 2024 09:58:44 +0100 Subject: [PATCH 1/2] Holidays that cannot be calculated with certainty deactivated https://github.com/nager/Nager.Date/issues/611 --- src/Nager.Date/HolidayProviders/TurkeyHolidayProvider.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Nager.Date/HolidayProviders/TurkeyHolidayProvider.cs b/src/Nager.Date/HolidayProviders/TurkeyHolidayProvider.cs index 068b4220..e1c5570a 100644 --- a/src/Nager.Date/HolidayProviders/TurkeyHolidayProvider.cs +++ b/src/Nager.Date/HolidayProviders/TurkeyHolidayProvider.cs @@ -93,8 +93,10 @@ protected override IEnumerable 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; From 59bd541596ef854a6776bfb1e203fe2205dfdddd Mon Sep 17 00:00:00 2001 From: Tino Hager Date: Thu, 28 Mar 2024 10:04:18 +0100 Subject: [PATCH 2/2] Cleanup unit tests --- .../Countries/TurkeyTest.cs | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/src/Nager.Date.UnitTest/Countries/TurkeyTest.cs b/src/Nager.Date.UnitTest/Countries/TurkeyTest.cs index 2aabe839..381397a0 100644 --- a/src/Nager.Date.UnitTest/Countries/TurkeyTest.cs +++ b/src/Nager.Date.UnitTest/Countries/TurkeyTest.cs @@ -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)] @@ -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) @@ -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) { @@ -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) {