mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
add parameter $format to checkDate()
This commit is contained in:
parent
53bac225fb
commit
1200460cee
|
@ -192,7 +192,7 @@ class SeedDMS_Core_DMS {
|
|||
* @param string $date date to be checked
|
||||
* @return boolean true if date is in propper format, otherwise false
|
||||
*/
|
||||
static function checkDate($date) { /* {{{ */
|
||||
static function checkDate($date, $format='Y-m-d H:i:s') { /* {{{ */
|
||||
$d = DateTime::createFromFormat($format, $date);
|
||||
return $d && $d->format($format) == $date;
|
||||
} /* }}} */
|
||||
|
|
Loading…
Reference in New Issue
Block a user