| | |
| | | * @param array $field_value |
| | | * @return bool |
| | | */ |
| | | |
| | | |
| | | function _datetime_selected($field_value) |
| | | { |
| | | if (is_array($field_value) && count($field_value) >= 5) |
| | | { |
| | | $result = array_filter($field_value, create_function('$dt_unit', 'return ($dt_unit > 0);')); |
| | | return (count($result) !== 0); |
| | | return count($result) !== 0; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Check wordbook for the existence of an |
| | |
| | | return $errmsg; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Helper function - filter the contents of the |
| | | * selectors and return the resulting unix timestamp. |
| | |
| | | |
| | | return mktime($hour, $minute, $second, $month, $day, $year); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * The minimum requirement to submit a datetime field |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Check that the selected datetime is in the future. |
| | | * |
| | |
| | | return $this->is_greater($field_name, $field_value, $validator); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Compare the selected datetime to a timestamp |
| | | * parsed via the validator array (key: compare). |