Skip to content

Commit

Permalink
add docs on how this feature should be used
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Feb 9, 2024
1 parent 1d34eab commit f4bcfe9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,22 @@ Holidays::has('be'); // true
Holidays::has('unknown'); // false
```

### Getting the observed holidays

Some countries observe holidays on different dates.
For example, if a holiday falls on a Sunday, it might be observed on the following Monday.
By default, we return the observed dates.

You can change this setting by passing `false` as argument.

```php
use Spatie\Holidays\Holidays;

$holidays = Holidays::for(country: 'be', observed: false))->get();
```

**Be aware** not all countries support this feature. Feel free to open a pull request if you want to add this feature to a country.

## Contributing

This is a community driven package. If you find any errors, please create a pull request with the fix, or at least open an issue.
Expand Down

0 comments on commit f4bcfe9

Please sign in to comment.