You are here

function date_views_argument_handler_simple::format in Date 8

Same name and namespace in other branches
  1. 7.3 date_views/includes/date_views_argument_handler_simple.inc \date_views_argument_handler_simple::format()
  2. 7.2 date_views/includes/date_views_argument_handler_simple.inc \date_views_argument_handler_simple::format()
1 call to date_views_argument_handler_simple::format()
date_views_argument_handler_simple::init in date_views/includes/date_views_argument_handler_simple.inc
Get granularity and use it to create the formula and a format for the results.

File

date_views/includes/date_views_argument_handler_simple.inc, line 48
Date API views argument handler.

Class

date_views_argument_handler_simple
Date API argument handler.

Code

function format() {
  if (!empty($this->options['granularity'])) {
    return $this->date_handler
      ->views_formats($this->options['granularity']);
  }
  else {
    return !empty($this->options[$this->option_name]) ? $this->options[$this->option_name] : 'Y-m';
  }
}