Overrides Numeric::op_between
function op_between($field) {
$a = intval(strtotime($this->value['min'], 0));
$b = intval(strtotime($this->value['max'], 0));
if ($this->value['type'] == 'offset') {
$a = '***CURRENT_TIME***' . sprintf('%+d', $a);
// keep sign
$b = '***CURRENT_TIME***' . sprintf('%+d', $b);
// keep sign
}
// This is safe because we are manually scrubbing the values.
// It is necessary to do it this way because $a and $b are formulas when using an offset.
$operator = strtoupper($this->operator);
$this->query
->add_where_expression($this->options['group'], "{$field} {$operator} {$a} AND {$b}");
}