pride month
This commit is contained in:
parent
b9ce0a9f61
commit
35a520becc
4 changed files with 14 additions and 5 deletions
|
|
@ -21,6 +21,7 @@ public function render(): View|Closure|string {
|
|||
$event = '';
|
||||
if ($this->isItChristmas()) $event = 'christmas';
|
||||
if ($this->isItAprilFools()) $event = 'april-fools';
|
||||
if ($this->isItPrideMonth()) $event = 'pride';
|
||||
if (isLegacy()) {
|
||||
return view('components.layout-legacy', [
|
||||
'event' => $event
|
||||
|
|
@ -52,4 +53,12 @@ public function isItAprilFools() : bool {
|
|||
|
||||
return $currentDate == $aprilFools;
|
||||
}
|
||||
|
||||
public function isItPrideMonth() {
|
||||
$tz = new DateTimeZone("Europe/London");
|
||||
$currentDate = new DateTime("now", $tz);
|
||||
$currentDate->setTime(0, 0);
|
||||
|
||||
return date_format($currentDate,"n") == 6;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue