Cleaned up commit from 'feature-27351/Digitalisierung_Formulare_Abmeldung_Unterbrechung_Wiederholung'

This commit is contained in:
cgfhtw
2023-07-04 10:34:14 +02:00
parent 5213ab44ff
commit 64ce3d1f6a
82 changed files with 12192 additions and 61 deletions
+16
View File
@@ -18,6 +18,8 @@
if (! defined('BASEPATH')) exit('No direct script access allowed');
use \DateTime as DateTime;
// ------------------------------------------------------------------------
// Collection of utility functions for general purpose
// ------------------------------------------------------------------------
@@ -405,3 +407,17 @@ function findResource($path, $resource, $subdir = false, $extraDir = null)
return null;
}
/**
* check if String can be converted to a date
*/
function isValidDate($dateString)
{
try
{
return (new DateTime($dateString)) !== false;
}
catch(Exception $e)
{
return false;
}
}