You are here

function getICalDateTime in Availability Calendars 7.5

Returns a time stamp in the iCal date-time format.

Parameters

\Datetime $date:

Return value

string A time stamp according tot he iCal date-time format

1 call to getICalDateTime()
availability_calendar_process_availability_calendar_ical_vcalendar in ./availability_calendar.ical.inc
Implements hook_process_HOOK for theme availability_calendar_ical_vcalendar.

File

theme/availability_calendar_ical_util.php, line 70

Code

function getICalDateTime(DateTime $date = null) {
  $iCalFormat = 'Ymd\\THis\\Z';
  return $date ? $date
    ->format($iCalFormat) : gmdate($iCalFormat);
}