Skip to content

Commit

Permalink
Update modManagerDateFormatter.php
Browse files Browse the repository at this point in the history
Implement requested change missed in previous commit
  • Loading branch information
smg6511 committed Oct 2, 2024
1 parent 10a3a37 commit 3b3a0cc
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions core/src/Revolution/Formatter/modManagerDateFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3b3a0cc

Please sign in to comment.