You are here

function date_content_generate_key in Date 8

Same name and namespace in other branches
  1. 5.2 date/date_content_generate.inc \date_content_generate_key()
  2. 6.2 date/date_content_generate.inc \date_content_generate_key()
  3. 7.3 date_repeat_field/date_repeat_field.devel_generate.inc \date_content_generate_key()
  4. 7 date.devel_generate.inc \date_content_generate_key()
  5. 7.2 date_repeat_field/date_repeat_field.devel_generate.inc \date_content_generate_key()
1 call to date_content_generate_key()
date_repeat_field_date_field_insert in date_repeat_field/date_repeat_field.devel_generate.inc
Implements hook_date_field_insert().

File

date_repeat_field/date_repeat_field.devel_generate.inc, line 125

Code

function date_content_generate_key($array) {
  $keys = array_keys($array);
  $min = array_shift($keys);
  $max = array_pop($keys);
  return mt_rand($min, $max);
}