function date_granularity_names in Date 7
Same name and namespace in other branches
- 5.2 date_api.module \date_granularity_names()
- 5 date.inc \date_granularity_names()
- 6.2 date_api.module \date_granularity_names()
- 6 date_api.module \date_granularity_names()
- 7.3 date_api/date_api.module \date_granularity_names()
- 7.2 date_api/date_api.module \date_granularity_names()
Array of granularity options and their labels
Return value
array
4 calls to date_granularity_names()
- date_tools_wizard_form in date_tools/
date_tools.wizard.inc - theme_date_text_parts in ./
date.theme - Display the text/select options for date parts in a table for easier readability.
- _date_field_settings_form in ./
date_admin.inc - _date_field_widget_settings_form in ./
date_admin.inc
File
- date_api/
date_api.module, line 1030 - This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.
Code
function date_granularity_names() {
return array(
'year' => t('Year', array(), array(
'context' => 'datetime',
)),
'month' => t('Month', array(), array(
'context' => 'datetime',
)),
'day' => t('Day', array(), array(
'context' => 'datetime',
)),
'hour' => t('Hour', array(), array(
'context' => 'datetime',
)),
'minute' => t('Minute', array(), array(
'context' => 'datetime',
)),
'second' => t('Second', array(), array(
'context' => 'datetime',
)),
);
}