function date_granularity_sorted in Date 6.2
Same name and namespace in other branches
- 7.3 date_api/date_api.module \date_granularity_sorted()
- 7 date_api/date_api.module \date_granularity_sorted()
- 7.2 date_api/date_api.module \date_granularity_sorted()
Sort a granularity array.
3 calls to date_granularity_sorted()
- date_granularity_precision in ./
date_api.module - Give a granularity array, return the highest precision.
- date_is_valid in ./
date_api.module - Functions to test the validity of a date in various formats. Has special case for ISO dates and arrays which can be missing month and day and still be valid.
- date_make_date in ./
date_api.module - Convert a date of any type or an array of date parts into a valid date object.
File
- ./
date_api.module, line 480 - 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);
}