diff --git a/src/Countries/Bangladesh.php b/src/Countries/Bangladesh.php new file mode 100644 index 000000000..6df457a6a --- /dev/null +++ b/src/Countries/Bangladesh.php @@ -0,0 +1,35 @@ + */ + protected function allHolidays(int $year): array + { + return array_merge([ + 'International Mother Language Day' => '02-21', + 'Birthday of Sheikh Mujibur Rahman' => '03-17', + 'Independence Day' => '03-26', + 'Bengali New Year' => '04-14', + 'May Day' => '05-01', + 'National Mourning Day' => '08-15', + 'Victory Day' => '12-16', + 'Christmas Day' => '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/BangladeshTest/it_can_calculate_bangladesh_holidays.snap b/tests/.pest/snapshots/Countries/BangladeshTest/it_can_calculate_bangladesh_holidays.snap new file mode 100644 index 000000000..f5a0e91db --- /dev/null +++ b/tests/.pest/snapshots/Countries/BangladeshTest/it_can_calculate_bangladesh_holidays.snap @@ -0,0 +1,34 @@ +[ + { + "name": "International Mother Language Day", + "date": "2024-02-21" + }, + { + "name": "Birthday of Sheikh Mujibur Rahman", + "date": "2024-03-17" + }, + { + "name": "Independence Day", + "date": "2024-03-26" + }, + { + "name": "Bengali New Year", + "date": "2024-04-14" + }, + { + "name": "May Day", + "date": "2024-05-01" + }, + { + "name": "National Mourning Day", + "date": "2024-08-15" + }, + { + "name": "Victory Day", + "date": "2024-12-16" + }, + { + "name": "Christmas Day", + "date": "2024-12-25" + } +] \ No newline at end of file diff --git a/tests/Countries/BangladeshTest.php b/tests/Countries/BangladeshTest.php new file mode 100644 index 000000000..b5b0f0b59 --- /dev/null +++ b/tests/Countries/BangladeshTest.php @@ -0,0 +1,18 @@ +get(); + + expect($holidays) + ->toBeArray() + ->not()->toBeEmpty(); + + expect(formatDates($holidays))->toMatchSnapshot(); +});