From 3b3a0cc84be3058f6a13a438e8539e71bc75317d Mon Sep 17 00:00:00 2001 From: Jim Graham Date: Tue, 1 Oct 2024 20:43:23 -0400 Subject: [PATCH] Update modManagerDateFormatter.php Implement requested change missed in previous commit --- .../Formatter/modManagerDateFormatter.php | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/core/src/Revolution/Formatter/modManagerDateFormatter.php b/core/src/Revolution/Formatter/modManagerDateFormatter.php index 06c88485f6..b89a0fa421 100644 --- a/core/src/Revolution/Formatter/modManagerDateFormatter.php +++ b/core/src/Revolution/Formatter/modManagerDateFormatter.php @@ -225,20 +225,19 @@ public function formatResourceDate($value, string $whichDate = 'created', bool $ public function formatPackageDate($value, string $whichDate = 'created', bool $useStandardEmptyValue = true): string { if ($useStandardEmptyValue) { - $emptyValue = null; - } else { - switch ($whichDate) { - case 'installed': - $emptyValue = $this->modx->lexicon('not_installed'); - break; - case 'updated': - $emptyValue = $this->modx->lexicon('not_updated'); - break; - default: - $emptyValue = $this->modx->lexicon('unknown'); - } - $emptyValue = '(' . $emptyValue . ')'; + return $this->formatDateTime($value, true, null); } + switch ($whichDate) { + case 'installed': + $emptyValue = $this->modx->lexicon('not_installed'); + break; + case 'updated': + $emptyValue = $this->modx->lexicon('not_updated'); + break; + default: + $emptyValue = $this->modx->lexicon('unknown'); + } + $emptyValue = '(' . $emptyValue . ')'; return $this->formatDateTime($value, true, $emptyValue); }