mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
[IMPR] Holiday today
This commit is contained in:
parent
df2c74b45f
commit
d16dec09a6
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user