mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
Add page and api for stats about phone sended sms
This commit is contained in:
parent
064d6fd941
commit
4f717ef849
11 changed files with 530 additions and 0 deletions
|
@ -168,6 +168,26 @@ use BenMorel\GsmCharsetConverter\Converter;
|
|||
return $logo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a string is a valid PHP date
|
||||
*
|
||||
* @param string $date : Datestring to validate
|
||||
*
|
||||
* @return bool : True if a valid date, false else
|
||||
*/
|
||||
public static function is_valid_date($date)
|
||||
{
|
||||
try
|
||||
{
|
||||
new \DateTime($date);
|
||||
return true;
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cette fonction vérifie une date.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue