You are here

function hook_fullcalendar_process_dates_alter in FullCalendar 7.2

Same name and namespace in other branches
  1. 8.5 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
  2. 8 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
  3. 8.2 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
  4. 8.3 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
  5. 8.4 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()

Alter the dates after they're loaded, before they're added for rendering.

Parameters

object $date1: The start date object.

object $date2: The end date object.

array $context: An associative array containing the following key-value pairs:

  • instance: The field instance.
  • entity: The entity object for this date.
  • field: The field info.
1 invocation of hook_fullcalendar_process_dates_alter()
_fullcalendar_process_dates in theme/theme.inc
Process the dates, format them, and determine if it is all day.

File

./fullcalendar.api.php, line 101
Hooks provided by the FullCalendar module.

Code

function hook_fullcalendar_process_dates_alter(&$date1, &$date2, $context) {

  // Always display dates only on one day.
  if ($date1
    ->format(DATE_FORMAT_DATE) != $date2
    ->format(DATE_FORMAT_DATE)) {
    $date2 = $date1;
  }
}