Skip to content

Commit

Permalink
Merge pull request #45 from m0rth1um/de-tag-der-befreiung
Browse files Browse the repository at this point in the history
Added Tag der Befreiung for Berlin, Germany, 2020
  • Loading branch information
FlorianKoerner authored Dec 24, 2020
2 parents 4333cc5 + 7c4467f commit 04c9cc4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/Provider/DE.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public function getHolidaysByYear($year)
self::STATE_RP,
self::STATE_SL,
)),

// Variable dates
$easter['goodFriday']->format(self::DATE_FORMAT) => $this->createData('Karfreitag'),
$easter['easterSunday']->format(self::DATE_FORMAT) => $this->createData('Ostersonntag', array(
Expand Down Expand Up @@ -116,6 +115,13 @@ public function getHolidaysByYear($year)
));
}

if (2020 === $year) {
// https://de.wikipedia.org/wiki/Tag_der_Befreiung
$holidays['05-08'] = $this->createData('Tag der Befreiung', array(
self::STATE_BE,
));
}

return $holidays;
}

Expand Down
6 changes: 5 additions & 1 deletion test/Provider/DETest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ public function dateProvider()
array('2016-10-31', DE::STATE_BB, array('name' => 'Reformationstag')),
array('2017-10-31', DE::STATE_SH, array('name' => 'Reformationstag')),
array('2017-10-31', DE::STATE_BB, array('name' => 'Reformationstag')),
array('2018-10-31', DE::STATE_SH, array('name' => 'Reformationstag')),
array('2018-10-31', DE::STATE_SH, array('name' => 'Reformationstag')),
array('2018-11-21', DE::STATE_BB, null),
array('2018-11-21', DE::STATE_SN, array('name' => 'Buß- und Bettag')),
array('2019-05-08', DE::STATE_BE, null),
array('2020-05-08', DE::STATE_BE, array('name' => 'Tag der Befreiung')),
array('2020-05-08', DE::STATE_BY, null),
array('2021-05-08', DE::STATE_BE, null),
array('2018-03-08', DE::STATE_BE, null),
array('2019-03-08', DE::STATE_BE, array('name' => 'Internationaler Frauentag')),
array('2021-03-08', DE::STATE_BE, array('name' => 'Internationaler Frauentag')),
Expand Down

0 comments on commit 04c9cc4

Please sign in to comment.