You are here

function date_granularity_precision in Date 7.2

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

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.

5 calls to date_granularity_precision()
date_all_day_date_combo_process_alter in date_all_day/date_all_day.module
Implements hook_date_combo_process_alter().
date_all_day_field in date_all_day/date_all_day.module
Determine if a Start/End date combination qualify as 'All day'.
date_field_all_day in ./date.module
Duplicate of what is now date_all_day_field() in the Date All Day module.
date_granularity_format in date_api/date_api.module
Constructs a valid DATETIME format string for the granularity of an item.
theme_date_display_combination in ./date.theme
Returns HTML for a date element formatted as a Start/End combination.

File

date_api/date_api.module, line 1659
This module will make the date API available to other modules.

Code

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