function date_granularity_sorted in Date 7
Same name and namespace in other branches
- 6.2 date_api.module \date_granularity_sorted()
- 7.3 date_api/date_api.module \date_granularity_sorted()
- 7.2 date_api/date_api.module \date_granularity_sorted()
Sort a granularity array.
File
- date_api/
date_api.module, line 1044 - 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_sorted($granularity) {
return array_intersect(array(
'year',
'month',
'day',
'hour',
'minute',
'second',
), $granularity);
}