From 8265ca15d7582e62d6e9407eedee5370e833a860 Mon Sep 17 00:00:00 2001 From: Scott Boms Date: Mon, 27 Jan 2025 20:54:15 -0800 Subject: [PATCH] Further changes for Kirby 5 compatibility. --- README.md | 2 +- classes/Microseasons.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03dabe6..7d3d072 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Output information for one of the [72 Japanese micro season](https://www.nippon. ## Requirements -- [**Kirby**](https://getkirby.com/) 4.x +- [**Kirby**](https://getkirby.com/) 4.x or 5.x ## Installation diff --git a/classes/Microseasons.php b/classes/Microseasons.php index af011c0..a45872a 100644 --- a/classes/Microseasons.php +++ b/classes/Microseasons.php @@ -75,7 +75,9 @@ public static function getSeason($today, $jsonFileUrl): array { } public static function convertDateFormat($dateString): string { - $reformattedDate = $dateString->format('M d') ?? $dateString->format(option("scottboms.microseasons.dateformat")); + $dateFormat = option("scottboms.microseasons.dateformat") ?? 'M d'; + + $reformattedDate = $dateString->format($dateFormat); return $reformattedDate; } } \ No newline at end of file