You are here

function spaces_calendar_event_submit in Spaces 5

Same name and namespace in other branches
  1. 5.2 spaces_calendar/spaces_calendar.module \spaces_calendar_event_submit()

File

spaces_calendar/spaces_calendar.module, line 222

Code

function spaces_calendar_event_submit($form_id, $form_values) {
  $n = node_submit($form_values);
  if ($date = $n->field_date[0]['value']) {
    $date = strtotime($date);
    $m = format_date($date, 'custom', 'm');
    $y = format_date($date, 'custom', 'Y');
    return "calendar/{$y}/{$m}";
  }
}