Skip to content

Commit 8265ca1

Browse files
committed
Further changes for Kirby 5 compatibility.
1 parent 3cacc84 commit 8265ca1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Output information for one of the [72 Japanese micro season](https://www.nippon.
44

55
## Requirements
66

7-
- [**Kirby**](https://getkirby.com/) 4.x
7+
- [**Kirby**](https://getkirby.com/) 4.x or 5.x
88

99
## Installation
1010

classes/Microseasons.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ public static function getSeason($today, $jsonFileUrl): array {
7575
}
7676

7777
public static function convertDateFormat($dateString): string {
78-
$reformattedDate = $dateString->format('M d') ?? $dateString->format(option("scottboms.microseasons.dateformat"));
78+
$dateFormat = option("scottboms.microseasons.dateformat") ?? 'M d';
79+
80+
$reformattedDate = $dateString->format($dateFormat);
7981
return $reformattedDate;
8082
}
8183
}

0 commit comments

Comments
 (0)