pride month

This commit is contained in:
Roscoe 2026-06-02 00:39:53 +01:00
commit 35a520becc
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
4 changed files with 14 additions and 5 deletions

View file

@ -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;
}
}