You are here

function date_has_date in Date 7

Same name and namespace in other branches
  1. 5.2 date_api.module \date_has_date()
  2. 6.2 date_api.module \date_has_date()
  3. 7.3 date_api/date_api.module \date_has_date()
  4. 7.2 date_api/date_api.module \date_has_date()
1 call to date_has_date()
date_limit_format in date_api/date_api.module
Rewrite a format string so it only includes elements from a specified granularity array.

File

date_api/date_api.module, line 1560
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;
}