mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 17:05:46 +00:00
add method checkDate()
This commit is contained in:
parent
4f3381a268
commit
3699adfaf5
|
@ -186,6 +186,17 @@ class SeedDMS_Core_DMS {
|
||||||
return false;
|
return false;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if date conforms to a given format
|
||||||
|
*
|
||||||
|
* @param string $date date to be checked
|
||||||
|
* @return boolean true if date is in propper format, otherwise false
|
||||||
|
*/
|
||||||
|
static function checkDate($date) { /* {{{ */
|
||||||
|
$d = DateTime::createFromFormat($format, $date);
|
||||||
|
return $d && $d->format($format) == $date;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter objects out which are not accessible in a given mode by a user.
|
* Filter objects out which are not accessible in a given mode by a user.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user