function views_handler_filter_date::op_simple in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 6.2 handlers/views_handler_filter_date.inc \views_handler_filter_date::op_simple()
- 7.3 handlers/views_handler_filter_date.inc \views_handler_filter_date::op_simple()
Overrides views_handler_filter_numeric::op_simple
File
- handlers/
views_handler_filter_date.inc, line 152
Class
- views_handler_filter_date
- Filter to handle dates stored as a timestamp.
Code
function op_simple($field) {
$value = intval(strtotime($this->value['value'], 0));
if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
$value = '***CURRENT_TIME***' . sprintf('%+d', $value);
// keep sign
}
$this->query
->add_where($this->options['group'], "{$field} {$this->operator} %s", $value);
}