You are here

function date_api_argument_handler::init in Date 6

Same name and namespace in other branches
  1. 6.2 includes/date_api_argument_handler.inc \date_api_argument_handler::init()

Get granularity and use it to create the formula and a format for the results.

File

./date_api.views.inc, line 121
Defines date-related Views data and plugins:

Class

date_api_argument_handler
Date API argument handler.

Code

function init(&$view, $options) {
  parent::init($view, $options);
  $date_handler = $this->date_handler;
  $this->format = $date_handler
    ->views_formats($date_handler->granularity, 'display');
  $this->sql_format = $date_handler
    ->views_formats($date_handler->granularity, 'sql');
}