You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can add custom holidays by registering a method that returns a map of holidays for a given year.
26
+
Set this up in a central place that always runs before your application, e.g. a bootstrap method.
27
+
28
+
```php
29
+
use MLL\Holidays\BavarianHolidays;
30
+
31
+
BavarianHolidays::$loadUserDefinedHolidays = static function (int $year): array {
32
+
switch ($year) {
33
+
case 2019:
34
+
return ['22.03' => 'Day of the Tentacle'];
35
+
default:
36
+
return [];
37
+
}
38
+
};
39
+
```
40
+
41
+
Custom holidays have precedence over the holidays inherent to this library.
42
+
23
43
### PHPStan extension
24
44
25
45
This library provides a PHPStan extension that is either registered through [PHPStan Extension Installer](https://github.com/phpstan/extension-installer)
0 commit comments