You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
490 B
26 lines
490 B
![]()
12 years ago
|
<?php
|
||
|
/* For licensing terms, see /license.txt */
|
||
![]()
11 years ago
|
|
||
![]()
12 years ago
|
/**
|
||
![]()
8 years ago
|
* Class DateTimeRule.
|
||
|
*
|
||
![]()
11 years ago
|
* @author Julio Montoya
|
||
![]()
12 years ago
|
*/
|
||
|
class DateTimeRule extends HTML_QuickForm_Rule
|
||
|
{
|
||
![]()
11 years ago
|
/**
|
||
![]()
8 years ago
|
* Check a date.
|
||
![]()
11 years ago
|
*
|
||
![]()
8 years ago
|
* @param string $date example 2014-04-30 18:00
|
||
![]()
11 years ago
|
* @param array $options
|
||
![]()
12 years ago
|
*
|
||
![]()
8 years ago
|
* @return bool True if date is valid
|
||
|
*
|
||
![]()
11 years ago
|
* @see HTML_QuickForm_Rule
|
||
|
*/
|
||
|
public function validate($date, $options)
|
||
|
{
|
||
![]()
11 years ago
|
return api_is_valid_date($date, 'Y-m-d H:i');
|
||
![]()
11 years ago
|
}
|
||
![]()
12 years ago
|
}
|