mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Fixed all (or most of) the broken stuff after the dependency upgrade party
This commit is contained in:
@@ -110,3 +110,15 @@ function IsAssociativeArray(array $array)
|
||||
$keys = array_keys($array);
|
||||
return array_keys($keys) !== $keys;
|
||||
}
|
||||
|
||||
function IsIsoDate($dateString)
|
||||
{
|
||||
$d = DateTime::createFromFormat('Y-m-d', $dateString);
|
||||
return $d && $d->format('Y-m-d') === $dateString;
|
||||
}
|
||||
|
||||
function IsIsoDateTime($dateTimeString)
|
||||
{
|
||||
$d = DateTime::createFromFormat('Y-m-d H:i:s', $dateTimeString);
|
||||
return $d && $d->format('Y-m-d H:i:s') === $dateTimeString;
|
||||
}
|
||||
|
Reference in New Issue
Block a user