public function calcEndDateTimeBasedOnDuration()
    {
        $duration = $this->Duration;
        $secs = (substr($duration, 0, 2) * 3600) + (substr($duration, 3, 2) * 60);

        $startDate = strtotime($this->StartDateTime);
        $endDate = $startDate + $secs;
        $formatDate = date("Y-m-d H:i:s", $endDate);

        return $formatDate;
    }
public function calcEndDateTimeBasedOnDuration()
    {
        $duration = $this->Duration;
        $secs = (substr($duration, 0, 2) * 3600) + (substr($duration, 3, 2) * 60);

        $startDate = strtotime($this->StartDateTime);
        $endDate = $startDate + $secs;
        $formatDate = date("Y-m-d H:i:s", $endDate);

        return $formatDate;
    }
public function calcEndDateTimeBasedOnDuration ( ) { $ duration = $ this -> Duration ; $ secs = ( substr ( $ duration , 0 , 2 ) * 3600 ) + ( substr ( $ duration , 3 , 2 ) * 60 ) ; $ startDate = strtotime ( $ this -> StartDateTime ) ; $ endDate = $ startDate + $ secs ; $ formatDate = date ( "Y-m-d H:i:s" , $ endDate ) ; return $ formatDate ; }
Calculation of end date based on duration
Should only be used in OnBeforeWrite
@return string
Calculation of end date based on duration Should only be used in OnBeforeWrite