diff --git a/lang/syria/ar/holidays.json b/lang/syria/ar/holidays.json new file mode 100644 index 000000000..0d8232130 --- /dev/null +++ b/lang/syria/ar/holidays.json @@ -0,0 +1,16 @@ +{ + "New Year\n's Day": "يوم رأس السنة", + "Mother\n's Day": "عيد الأم", + "Teacher\n's Day": "عيد المعلم", + "Western Easter": "عيد الفصح الغربي", + "Eid al-Fitr": "عيد الفطر السعيد", + "Syrian Independence Day": "عيد الجلاء واستقلال سورية", + "Labor Day": "عيد العمال", + "Eastern Easter": "عيد الفصح الشرقي", + "Martyrs\n' Day": "عيد الشهداء", + "Eid al-Adha": "عيد الأضحى المبارك", + "Islamic New Year": "عيد رأس السنة الهجرية", + "The commemoration of the birth of the Prophet Muhammad": "عيد مولد الرسول الأعظم", + "The October Liberation War": "ذكرى حرب تشرين التحريرية", + "Merry Christmas": "عيد الميلاد المجيد" +} diff --git a/src/Countries/Syria.php b/src/Countries/Syria.php new file mode 100644 index 000000000..b71845d0b --- /dev/null +++ b/src/Countries/Syria.php @@ -0,0 +1,40 @@ + '01-01', + "Mother\n's Day" => '03-21', + "Teacher\n's Day" => '03-21', + "Western Easter" => '03-31', + "Eid al-Fitr" => '04-10', + "Syrian Independence Day" => '04-17', + "Labor Day" => '05-01', + "Eastern Easter" => '05-05', + "Martyr\n's Day" => '05-06', + "Eid al-Adha" => '06-16', + "Islamic New Year" => '07-07', + "The commemoration of the birth of the Prophet Muhammad" => '09-15', + "The October Liberation War" => '10-06', + "Christmas" => '12-25', + ], $this->variableHolidays($year)); + } + + /** @return array */ + protected function variableHolidays(int $year): array + { + // The variable holidays all follow the lunar calendar, so their dates are not confirmed. + return []; + } +} diff --git a/tests/.pest/snapshots/Countries/SyriaTest/it_can_calculate_syria_holidays.snap b/tests/.pest/snapshots/Countries/SyriaTest/it_can_calculate_syria_holidays.snap new file mode 100644 index 000000000..ac2f037d4 --- /dev/null +++ b/tests/.pest/snapshots/Countries/SyriaTest/it_can_calculate_syria_holidays.snap @@ -0,0 +1,58 @@ +[ + { + "name": "New Year\n's Day", + "date": "2024-01-01" + }, + { + "name": "Mother\n's Day", + "date": "2024-03-21" + }, + { + "name": "Teacher\n's Day", + "date": "2024-03-21" + }, + { + "name": "Western Easter", + "date": "2024-03-31" + }, + { + "name": "Eid al-Fitr", + "date": "2024-04-10" + }, + { + "name": "Syrian Independence Day", + "date": "2024-04-17" + }, + { + "name": "Labor Day", + "date": "2024-05-01" + }, + { + "name": "Eastern Easter", + "date": "2024-05-05" + }, + { + "name": "Martyr\n's Day", + "date": "2024-05-06" + }, + { + "name": "Eid al-Adha", + "date": "2024-06-16" + }, + { + "name": "Islamic New Year", + "date": "2024-07-07" + }, + { + "name": "The commemoration of the birth of the Prophet Muhammad", + "date": "2024-09-15" + }, + { + "name": "The October Liberation War", + "date": "2024-10-06" + }, + { + "name": "Merry Christmas", + "date": "2024-12-25" + } +] \ No newline at end of file diff --git a/tests/.pest/snapshots/Countries/SyriaTest/it_can_translate_syria_holidays_into_arabic.snap b/tests/.pest/snapshots/Countries/SyriaTest/it_can_translate_syria_holidays_into_arabic.snap new file mode 100644 index 000000000..f61ec2e69 --- /dev/null +++ b/tests/.pest/snapshots/Countries/SyriaTest/it_can_translate_syria_holidays_into_arabic.snap @@ -0,0 +1,58 @@ +[ + { + "name": "\u064a\u0648\u0645 \u0631\u0623\u0633 \u0627\u0644\u0633\u0646\u0629", + "date": "2024-01-01" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0623\u0645", + "date": "2024-03-21" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0645\u0639\u0644\u0645", + "date": "2024-03-21" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0641\u0635\u062d \u0627\u0644\u063a\u0631\u0628\u064a", + "date": "2024-03-31" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0641\u0637\u0631 \u0627\u0644\u0633\u0639\u064a\u062f", + "date": "2024-04-10" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u062c\u0644\u0627\u0621 \u0648\u0627\u0633\u062a\u0642\u0644\u0627\u0644 \u0633\u0648\u0631\u064a\u0629", + "date": "2024-04-17" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0639\u0645\u0627\u0644", + "date": "2024-05-01" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0641\u0635\u062d \u0627\u0644\u0634\u0631\u0642\u064a", + "date": "2024-05-05" + }, + { + "name": "Martyr\n's Day", + "date": "2024-05-06" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0623\u0636\u062d\u0649 \u0627\u0644\u0645\u0628\u0627\u0631\u0643", + "date": "2024-06-16" + }, + { + "name": "\u0639\u064a\u062f \u0631\u0623\u0633 \u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0647\u062c\u0631\u064a\u0629", + "date": "2024-07-07" + }, + { + "name": "\u0639\u064a\u062f \u0645\u0648\u0644\u062f \u0627\u0644\u0631\u0633\u0648\u0644 \u0627\u0644\u0623\u0639\u0638\u0645", + "date": "2024-09-15" + }, + { + "name": "\u0630\u0643\u0631\u0649 \u062d\u0631\u0628 \u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062a\u062d\u0631\u064a\u0631\u064a\u0629", + "date": "2024-10-06" + }, + { + "name": "\u0639\u064a\u062f \u0627\u0644\u0645\u064a\u0644\u0627\u062f \u0627\u0644\u0645\u062c\u064a\u062f", + "date": "2024-12-25" + } +] \ No newline at end of file diff --git a/tests/Countries/SyriaTest.php b/tests/Countries/SyriaTest.php new file mode 100644 index 000000000..6bf5ed7df --- /dev/null +++ b/tests/Countries/SyriaTest.php @@ -0,0 +1,25 @@ +get(); + + expect($holidays) + ->toBeArray() + ->not()->toBeEmpty() + ->and(formatDates($holidays))->toMatchSnapshot(); +}); +it('can translate syria holidays into arabic', function () { + $holidays = Holidays::for(country: 'sy', year: 2024, locale: 'ar')->get(); + expect($holidays) + ->toBeArray() + ->not()->toBeEmpty(); + + expect(formatDates($holidays))->toMatchSnapshot(); +});