|
|
@@ -109,6 +109,15 @@ class core
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public static function dateFromTimestamp(int $_timestamp = NULL)
|
|
|
+ {
|
|
|
+ if ($_timestamp == NULL) {
|
|
|
+ return NULL;
|
|
|
+ } else {
|
|
|
+ return date("Y-m-d H:i:s", $_timestamp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public static function dateWhithoutHours(string $_datetime)
|
|
|
{
|
|
|
return explode(" ", $_datetime)[0];
|