You are here

function date_field_all_day in Date 7.3

Same name and namespace in other branches
  1. 6.2 date/date.module \date_field_all_day()
  2. 7 date.module \date_field_all_day()
  3. 7.2 date.module \date_field_all_day()

Duplicate of what is now date_all_day_field() in the Date All Day module.

Left here to avoid breaking other modules that use this function.

File

./date.module, line 779

Code

function date_field_all_day($field, $instance, $date1, $date2 = NULL) {
  if (empty($value)) {
    return FALSE;
  }
  elseif (empty($instance['widget']['settings']['display_all_day'])) {
    return FALSE;
  }

  // As of 7.x-2.12 the logic for whether a field counts as "all day" is based
  // purely on this one value.
  return !empty($value['value']['local']['all_day']);
}