Skip to content

Commit

Permalink
feat: Add Bangla language support for Bangladeshi holidays
Browse files Browse the repository at this point in the history
  • Loading branch information
jfBiswajit committed Jan 26, 2024
1 parent 6649602 commit 12d8682
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lang/bangladesh/bn/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"International Mother Language Day": "আন্তর্জাতিক মাতৃভাষা দিবস",
"Birthday of Sheikh Mujibur Rahman": "শেখ মুজিবুর রহমানের জন্মদিন",
"Independence Day": "স্বাধীনতা দিবস",
"Bengali New Year": "বাংলা নববর্ষ",
"May Day": "মে দিবস",
"National Mourning Day": "জাতীয় শোক দিবস",
"Victory Day": "বিজয় দিবস",
"Christmas Day": "বড়দিন"
}
10 changes: 10 additions & 0 deletions lang/bangladesh/en/holidays.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"International Mother Language Day": "International Mother Language Day",
"Birthday of Sheikh Mujibur Rahman": "Birthday of Sheikh Mujibur Rahman",
"Independence Day": "Independence Day",
"Bengali New Year": "Bengali New Year",
"May Day": "May Day",
"National Mourning Day": "National Mourning Day",
"Victory Day": "Victory Day",
"Christmas Day": "Christmas Day"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"name": "\u0986\u09a8\u09cd\u09a4\u09b0\u09cd\u099c\u09be\u09a4\u09bf\u0995 \u09ae\u09be\u09a4\u09c3\u09ad\u09be\u09b7\u09be \u09a6\u09bf\u09ac\u09b8",
"date": "2024-02-21"
},
{
"name": "\u09b6\u09c7\u0996 \u09ae\u09c1\u099c\u09bf\u09ac\u09c1\u09b0 \u09b0\u09b9\u09ae\u09be\u09a8\u09c7\u09b0 \u099c\u09a8\u09cd\u09ae\u09a6\u09bf\u09a8",
"date": "2024-03-17"
},
{
"name": "\u09b8\u09cd\u09ac\u09be\u09a7\u09c0\u09a8\u09a4\u09be \u09a6\u09bf\u09ac\u09b8",
"date": "2024-03-26"
},
{
"name": "\u09ac\u09be\u0982\u09b2\u09be \u09a8\u09ac\u09ac\u09b0\u09cd\u09b7",
"date": "2024-04-14"
},
{
"name": "\u09ae\u09c7 \u09a6\u09bf\u09ac\u09b8",
"date": "2024-05-01"
},
{
"name": "\u099c\u09be\u09a4\u09c0\u09af\u09bc \u09b6\u09cb\u0995 \u09a6\u09bf\u09ac\u09b8",
"date": "2024-08-15"
},
{
"name": "\u09ac\u09bf\u099c\u09af\u09bc \u09a6\u09bf\u09ac\u09b8",
"date": "2024-12-16"
},
{
"name": "\u09ac\u09a1\u09bc\u09a6\u09bf\u09a8",
"date": "2024-12-25"
}
]
Original file line number Diff line number Diff line change
@@ -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"
}
]
24 changes: 24 additions & 0 deletions tests/Countries/BangladeshTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,27 @@

expect(formatDates($holidays))->toMatchSnapshot();
});

it('can calculate bangladesh holidays in English', function () {
CarbonImmutable::setTestNow('2024-01-01');

$holidays = Holidays::for(country: 'bd', locale: 'en')->get();

expect($holidays)
->toBeArray()
->not()->toBeEmpty();

expect(formatDates($holidays))->toMatchSnapshot();
});

it('can calculate bangladesh holidays in Bangla', function () {
CarbonImmutable::setTestNow('2024-01-01');

$holidays = Holidays::for(country: 'bd', locale: 'bn')->get();

expect($holidays)
->toBeArray()
->not()->toBeEmpty();

expect(formatDates($holidays))->toMatchSnapshot();
});

0 comments on commit 12d8682

Please sign in to comment.