spaanproductions/laravel-carbon-holidays

Add Dutch Holidays Check to Carbon in Laravel

3.0.3 2024-06-04 11:23 UTC

This package is auto-updated.

Last update: 2024-11-04 12:23:34 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

This package can be used to add the isHoliday() function to Carbon. This only checks the Dutch holidays at the moment. We will only check if it's a holiday, not if it's a mandatory free day.

Installation

You can install the package via composer:

composer require spaanproductions/laravel-carbon-holidays

It will auto discover in Laravel.

Usage

use \Carbon\Carbon;

// NewYear
$date = Carbon::createFromDate(2021, 01, 01);
$date->isHoliday(); // true

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email info@spaanproductions.nl instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.