You are here

function _calendar_systems_fix_display in Calendar Systems 7

Same name and namespace in other branches
  1. 8 calendar_systems.helpers.inc \_calendar_systems_fix_display()
  2. 7.2 calendar_systems.helpers.inc \_calendar_systems_fix_display()

Parameters

$date:

$format:

Return value

bool|mixed

1 call to _calendar_systems_fix_display()
calendar_systems_preprocess_date_display_combination in ./calendar_systems.module
Implements hook_preprocess_date_display_combination().

File

./calendar_systems.helpers.inc, line 119

Code

function _calendar_systems_fix_display($date, $format, $calendar_system_name) {
  $calendar = calendar_systems_get_calendar_instance($calendar_system_name);
  $date = new DateObject($date);
  $timestamp = $date
    ->format("U");
  if (!$timestamp) {
    return FALSE;
  }
  else {
    $content = $calendar
      ->smartGet($format, $timestamp);
    return $content;
  }
}