diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2020-08-01 19:07:11 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2020-08-01 19:07:11 +0100 |
| commit | b2d30019c3354437c10ffe7fcf4c0275b84ed318 (patch) | |
| tree | de6a8659522c791aab9560a16854abdcca7360a5 /app | |
| parent | 8aaf5f5816daa39be786ba83ab6d7723c9d2b6c1 (diff) | |
| download | webtrees-b2d30019c3354437c10ffe7fcf4c0275b84ed318.tar.gz webtrees-b2d30019c3354437c10ffe7fcf4c0275b84ed318.tar.bz2 webtrees-b2d30019c3354437c10ffe7fcf4c0275b84ed318.zip | |
Fix: %n and %t placeholders in date format
Diffstat (limited to 'app')
| -rw-r--r-- | app/Date/AbstractCalendarDate.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Date/AbstractCalendarDate.php b/app/Date/AbstractCalendarDate.php index 6cc3605571..3eddc7d1fb 100644 --- a/app/Date/AbstractCalendarDate.php +++ b/app/Date/AbstractCalendarDate.php @@ -637,10 +637,10 @@ abstract class AbstractCalendarDate $format = strtr($format, ['%M' => $this->formatShortMonth()]); } if (str_contains($format, '%n')) { - $format = strtr($format, [$this->formatMonth()]); + $format = strtr($format, ['%n' => $this->formatMonth()]); } if (str_contains($format, '%t')) { - $format = strtr($format, ['%n' => (string) $this->daysInMonth()]); + $format = strtr($format, ['%t' => (string) $this->daysInMonth()]); } if (str_contains($format, '%L')) { $format = strtr($format, ['%L' => $this->isLeapYear() ? '1' : '0']); |
