You are here

views_handler_filter_ad_statistics_date.inc in Advertisement 6.2

File

views/handlers/views_handler_filter_ad_statistics_date.inc
View source
<?php

/**
 * Filter to handle ad statistic dates stored as an integer (not a unix timestamp).
 *
 * @ingroup views_filter_handlers
 */
class views_handler_filter_ad_statistics_date extends views_handler_filter_date {
  function op_between($field) {
    $field = "UNIX_TIMESTAMP( STR_TO_DATE( CONVERT({$field}, CHAR), '%Y%m%%d%H') )";
    parent::op_between($field);
  }
  function op_simple($field) {
    $field = "UNIX_TIMESTAMP( STR_TO_DATE( CONVERT({$field}, CHAR), '%Y%m%%d%H') )";
    parent::op_simple($field);
  }

}

Classes

Namesort descending Description
views_handler_filter_ad_statistics_date Filter to handle ad statistic dates stored as an integer (not a unix timestamp).