Skip to content

Commit

Permalink
feat(holiday): add chinese new year holiday to indonesia
Browse files Browse the repository at this point in the history
  • Loading branch information
ddouble-d committed Jan 28, 2024
1 parent 3cdec4b commit 04038fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Countries/Indonesia.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
namespace Spatie\Holidays\Countries;

use Carbon\CarbonImmutable;
use Spatie\Holidays\Calendars\ChineseCalendar;

class Indonesia extends Country
{
use ChineseCalendar;

public function countryCode(): string
{
return 'id';
Expand All @@ -28,6 +31,7 @@ protected function variableHolidays(int $year): array
$easter = $this->easter($year);

return [
'Tahun Baru Imlek' => $this->chineseToGregorianDate('01-01', $year),
'Jumat Agung' => $easter->subDays(2),
'Hari Paskah' => $easter,
'Kenaikan Yesus Kristus' => $easter->addDays(39),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"name": "Tahun Baru",
"date": "2024-01-01"
},
{
"name": "Tahun Baru Imlek",
"date": "2024-02-10"
},
{
"name": "Jumat Agung",
"date": "2024-03-29"
Expand Down

0 comments on commit 04038fb

Please sign in to comment.