Release 1.6.1 (#1282)
This commit is contained in:
@@ -69,6 +69,7 @@ class Extensions extends AbstractExtension
|
||||
new TwigFilter('currency', [$this, 'currency']),
|
||||
new TwigFilter('country', [$this, 'country']),
|
||||
new TwigFilter('language', [$this, 'language']),
|
||||
new TwigFilter('amount', [$this, 'amount']),
|
||||
new TwigFilter('docu_link', [$this, 'documentationLink']),
|
||||
];
|
||||
}
|
||||
@@ -128,6 +129,15 @@ class Extensions extends AbstractExtension
|
||||
return $this->getNumberFormatter()->format(number_format($duration / 3600, 2));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|float $amount
|
||||
* @return bool|false|string
|
||||
*/
|
||||
public function amount($amount)
|
||||
{
|
||||
return $this->getNumberFormatter()->format($amount);
|
||||
}
|
||||
|
||||
private function getSecondsForDuration($duration): int
|
||||
{
|
||||
if (null === $duration) {
|
||||
|
||||
Reference in New Issue
Block a user