1 date.inc date_granularity_precision($granularity_array)

Give a granularity array, return the highest precision.

Parameters

array $granularity_array: An array of date parts.

Return value

string: The most precise element in a granularity array.

File

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

Code

function date_granularity_precision($granularity_array) {
  $input = date_granularity_sorted($granularity_array);
  return array_pop($input);
}