1 date.inc date_nongranularity($granularity)

Strips out unwanted granularity elements.

Parameters

array $granularity: An array like ('year', 'month', 'day', 'hour', 'minute', 'second');

Return value

array: A reduced set of granularity elements.

File

core/includes/date.inc, line 1340
Date API functions.

Code

function date_nongranularity($granularity) {
  $options = array(
    'year',
    'month',
    'day',
    'hour',
    'minute',
    'second',
    'timezone',
  );
  return array_diff($options, (array) $granularity);
}