35 lines
No EOL
638 B
PHP
35 lines
No EOL
638 B
PHP
<?php
|
|
namespace App\Services;
|
|
|
|
|
|
|
|
class Util
|
|
{
|
|
|
|
|
|
public static function formatDate(){
|
|
if(\App::getLocale() == "en"){
|
|
return 'yyyy-mm-dd';
|
|
}
|
|
return 'dd.mm.yyyy';
|
|
|
|
}
|
|
|
|
public static function formatDateDB(){
|
|
if(\App::getLocale() == "en"){
|
|
return 'Y-m-d';
|
|
}
|
|
return 'd.m.Y';
|
|
}
|
|
|
|
public static function formatDateTimeDB(){
|
|
if(\App::getLocale() == "en"){
|
|
return 'Y-m-d - H:i';
|
|
}
|
|
return 'd.m.Y - H:i';
|
|
}
|
|
|
|
public static function _format_number($value){
|
|
return preg_replace("/[^0-9,]/", "", $value);
|
|
}
|
|
} |