Calendar Holidays Yasumi

Available versions:


composer require aeon-php/calendar-holidays-yasumi


This is a brige between Yasumi library and Aeon Calendar Holidays that brings YasumiHolidays instance of Holidays.

Holidays Provider - YasumiHolidays


use Aeon\Calendar\Gregorian\GregorianCalendar;
use Aeon\Calendar\Gregorian\YasumiHolidays;
use Yasumi\Provider\Poland;

$calendar = GregorianCalendar::UTC();

$holidays = YasumiHolidays::provider(Poland::class, $calendar->currentYear()->number());

if ($holidays->isHoliday($calendar->currentYear()->january()->firstDay())) {
    echo "Happy New Year!";

Heads Up it returns holidays from all chained implementations so results might be duplicated.