You are here

function date_nongranularity in Date 5

Same name and namespace in other branches
  1. 5.2 date_api.module \date_nongranularity()
  2. 6.2 date_api.module \date_nongranularity()
  3. 6 date_api.module \date_nongranularity()
  4. 7.3 date_api/date_api.module \date_nongranularity()
  5. 7 date_api/date_api.module \date_nongranularity()
  6. 7.2 date_api/date_api.module \date_nongranularity()

An difference array of granularity elements that are NOT in the granularity array. Used by functions that strip unwanted granularity elements out of formats and values.

Parameters

$granularity: an array like ('Y', 'M', 'D', 'H', 'N', 'S');

1 call to date_nongranularity()
date_limit_format in ./date.inc
Rewrite a format string so it only inludes elements from a specified granularity array.

File

./date.inc, line 2354
Date/time API functions

Code

function date_nongranularity($granularity) {
  return array_diff(array(
    'Y',
    'M',
    'D',
    'H',
    'N',
    'S',
  ), $granularity);
}