diff --git a/src/Countries/Moldova.php b/src/Countries/Moldova.php new file mode 100644 index 000000000..0e7d3d47b --- /dev/null +++ b/src/Countries/Moldova.php @@ -0,0 +1,40 @@ + '01-01', + 'Crăciunul pe stil vechi' => '01-07', + 'A doua zi de Crăciun pe stil vechi' => '01-08', + 'Ziua Internațională a Femeii' => '03-08', + 'Ziua Muncii' => '05-01', + 'Ziua Europei' => '05-09', + 'Ziua Internațională a Copilului' => '06-01', + 'Ziua Independenței' => '08-27', + 'Ziua Limbii Române' => '08-31', + 'Crăciunul pe stil nou' => '12-25', + ], $this->variableHolidays($year)); + } + + /** @return array */ + protected function variableHolidays(int $year): array + { + $easter = $this->orthodoxEaster($year); + return [ + 'Prima zi de Paște' => $easter, + 'A doua zi de Paște' => $easter->addDay(), + 'Paștele Blajinilor' => $easter->addDays(8), + ]; + } +} diff --git a/tests/.pest/snapshots/Countries/MoldovaTest/it_can_calculate_moldavian_holidays.snap b/tests/.pest/snapshots/Countries/MoldovaTest/it_can_calculate_moldavian_holidays.snap new file mode 100644 index 000000000..9d18ecd37 --- /dev/null +++ b/tests/.pest/snapshots/Countries/MoldovaTest/it_can_calculate_moldavian_holidays.snap @@ -0,0 +1,54 @@ +[ + { + "name": "Anul Nou", + "date": "2024-01-01" + }, + { + "name": "Cr\u0103ciunul pe stil vechi", + "date": "2024-01-07" + }, + { + "name": "A doua zi de Cr\u0103ciun pe stil vechi", + "date": "2024-01-08" + }, + { + "name": "Ziua Interna\u021bional\u0103 a Femeii", + "date": "2024-03-08" + }, + { + "name": "Ziua Muncii", + "date": "2024-05-01" + }, + { + "name": "Prima zi de Pa\u0219te", + "date": "2024-05-05" + }, + { + "name": "A doua zi de Pa\u0219te", + "date": "2024-05-06" + }, + { + "name": "Ziua Europei", + "date": "2024-05-09" + }, + { + "name": "Pa\u0219tele Blajinilor", + "date": "2024-05-13" + }, + { + "name": "Ziua Interna\u021bional\u0103 a Copilului", + "date": "2024-06-01" + }, + { + "name": "Ziua Independen\u021bei", + "date": "2024-08-27" + }, + { + "name": "Ziua Limbii Rom\u00e2ne", + "date": "2024-08-31" + }, + { + "name": "Cr\u0103ciunul pe stil nou", + "date": "2024-12-25" + } +] \ No newline at end of file diff --git a/tests/Countries/MoldovaTest.php b/tests/Countries/MoldovaTest.php new file mode 100644 index 000000000..02ac0db64 --- /dev/null +++ b/tests/Countries/MoldovaTest.php @@ -0,0 +1,19 @@ +get(); + + expect($holidays) + ->toBeArray() + ->not()->toBeEmpty(); + + expect(formatDates($holidays))->toMatchSnapshot(); + +});