function date_plugin_argument_default::format in Date 6
2 calls to date_plugin_argument_default::format()
File
- ./
date_api.views.inc, line 394 - Defines date-related Views data and plugins:
Class
- date_plugin_argument_default
- Default argument plugin to default to the current date.
Code
function format() {
if (!empty($this->argument->options['granularity'])) {
$date_handler = new date_sql_handler();
return $date_handler
->views_formats($this->argument->options['granularity']);
}
else {
return !empty($this->argument->options[$this->option_name]) ? $this->argument->options[$this->option_name] : 'Y-m';
}
}