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