blob: 582995fcd5b4378435c7eca43f88a1a8f4b9c986 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
namespace App\Libraries;
use App\Libraries\TemplateFunction;
class TemplateFunction {
private static function formatFloat($float, $size = 2) {
return number_format($float, $size);
}
private static function stripDot($float) {
return str_replace(".", ",", $float);
}
public static function fF($float, $format = "") {
$f = TemplateFunction::formatFloat($float);
if ($f == intval($f)) {
$f = intval($f);
}
return TemplateFunction::stripDot($f);
}
public static function T($timestamp) {
return gmdate("d.m.Y.", $timestamp);
}
}
|