function date_views_argument_handler::format in Date 7
1 call to date_views_argument_handler::format()
- date_views_argument_handler::get_default_argument in date_views/
includes/ date_views_argument_handler.inc - Set the empty argument value to the current date, formatted appropriately for this argument.
File
- date_views/
includes/ date_views_argument_handler.inc, line 176 - Date API views argument handler.
Class
- date_views_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';
}
}