function date_has_date in Date 5.2
Same name and namespace in other branches
- 6.2 date_api.module \date_has_date()
- 7.3 date_api/date_api.module \date_has_date()
- 7 date_api/date_api.module \date_has_date()
- 7.2 date_api/date_api.module \date_has_date()
1 call to date_has_date()
- date_limit_format in ./
date_api.module - Rewrite a format string so it only includes elements from a specified granularity array.
File
- ./
date_api.module, line 1303 - 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_has_date($granularity) {
if (!is_array($granularity)) {
$granularity = array();
}
return sizeof(array_intersect($granularity, array(
'year',
'month',
'day',
))) > 0 ? TRUE : FALSE;
}