Skip to content

Commit

Permalink
Further changes for Kirby 5 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottboms committed Jan 28, 2025
1 parent 3cacc84 commit 8265ca1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion classes/Microseasons.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 8265ca1

Please sign in to comment.