[IMPR] Holiday today

This commit is contained in:
Tony Air 2023-06-02 16:30:04 +02:00
parent df2c74b45f
commit d16dec09a6

View File

@ -128,6 +128,13 @@ class OpenningHoursExtension extends DataExtension
));
}
public function HolidayToday()
{
$today = date('Y-m-d', time());
$holiday = Holiday::get()->filter('Date', $today);
return $holiday->exists() ? $holiday->first() : null;
}
/**
* Get the opening hours
*