You are here

function date_api_argument_handler::format in Date 6.2

1 call to date_api_argument_handler::format()
date_api_argument_handler::get_default_argument in includes/date_api_argument_handler.inc
Set the empty argument value to the current date, formatted appropriately for this argument.

File

includes/date_api_argument_handler.inc, line 191
Views argument handler.

Class

date_api_argument_handler
Date API argument handler.

Code

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