mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Make sure the "classic" page uses the transformer as well.
This commit is contained in:
@@ -65,6 +65,7 @@ class General extends Twig_Extension
|
||||
$this->steamPositive(),
|
||||
$this->activeRoutePartial(),
|
||||
$this->activeRoutePartialWhat(),
|
||||
$this->formatDate(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -179,6 +180,21 @@ class General extends Twig_Extension
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Twig_SimpleFunction
|
||||
*/
|
||||
protected function formatDate()
|
||||
{
|
||||
return new Twig_SimpleFunction(
|
||||
'formatDate',
|
||||
function (string $date, string $format): string {
|
||||
$carbon = new Carbon($date);
|
||||
|
||||
return $carbon->formatLocalized($format);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Twig_SimpleFilter
|
||||
*/
|
||||
|
Reference in New Issue
Block a user