You are here

function date_granularity_precision in Date 6.2

Same name and namespace in other branches
  1. 7.3 date_api/date_api.module \date_granularity_precision()
  2. 7 date_api/date_api.module \date_granularity_precision()
  3. 7.2 date_api/date_api.module \date_granularity_precision()

Give a granularity array, return the highest precision.

2 calls to date_granularity_precision()
date_field_all_day in date/date.module
Determine if a from/to date combination qualify as 'All day'.
date_granularity_format in ./date_api.module
Construct an appropriate DATETIME format string for the granularity of an item.

File

./date_api.module, line 509
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_granularity_precision($granularity_array) {
  $input = date_granularity_sorted($granularity_array);
  return array_pop($input);
}