Another nice addition to the event module would be the ability to set how long an event was. Beyond indicating the end time (or event length), it would also be nice to be able to set something as an all-day event (eg: Xmas, New Years), or to allow an event to span multiple days (eg: Conference).

Comments

moshe weitzman’s picture

Priority: Normal » Minor

All of these can be achieved by setting an End time. Changing priority to Minor. Please post how this will useful to users.

killes@www.drop.org’s picture

Can be done with additional fields in fields.inc.

Anonymous’s picture

owen barton’s picture

Version: » 4.6.x-1.x-dev

If you are happy with leaving the data-entry as it is this can be fixed in the theme using:

$length = $node->event_end - $node->event_start;
if ($length > 0) {
  $days = floor($length / (60*60*24));
  $length = $length % (60*60*24); // Remainder
  $hours = floor($length / (60*60));
  $length = $length % (60*60); // Remainder
  $minutes = floor($length / (60));
  if ($days > 0) {
    $output .= $days . ' day';
    if ($days > 1) {
    $output .= 's';
    }  
  }
  if ($hours > 0) {
    $output .= ' ' . $hours . ' hour';
    if ($hours > 1) {
    $output .= 's';
    }  
  }
  if ($minutes > 0) {
    $output .= ' ' . $minutes . ' minute';
    if ($minutes > 1) {
    $output .= 's';
    }  
  }
} 
owen barton’s picture

If you want to set event duration when creating/editing an event please see:
http://drupal.org/node/25618