Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method DetermineEndOfEvent ( 
 | 
  DateTime start_i 
 | 
) as DateTime id:Method_LibCal_GlobalState_DetermineEndOfEvent 
 | 
{ 
 | 
  #keys: '[131094.1.1246594293]' 
 | 
  Body: 
 | 
  [* 
 | 
    // Determine the endtime of an event based on the event's start_i. 
 | 
    // Is implemented in this method so that it is possible to change the behavior in all relevant places 
 | 
    // in the same way in one go by changing this method. 
 | 
    end := start_i + Duration::Hours( 1 ); 
 | 
     
 | 
    // When running in days only mode, start_i is expected to be the start of a day. 
 | 
    // The end is in that case the start of the next day, i.e. 1 day later. 
 | 
    if( LibCal_Event::USE_ONLY_DAYS() ) 
 | 
    { 
 | 
      end := start_i + Duration::Days( 1 ); 
 | 
    } 
 | 
     
 | 
    return end; 
 | 
  *] 
 | 
} 
 |