public function getAvailableTill()
    {
        if ($this->AvailableTillDate) {
            return $this->dbObject('AvailableTillDate');
        } elseif ($startDate = $this->getEventStartDate()) {
            $till = strtotime(self::config()->get('sale_end_threshold'), strtotime($startDate->Nice()));
            $date = SS_Datetime::create();
            $date->setValue(date('Y-m-d H:i:s', $till));
            return $date;
        }

        return null;
    }
public function getAvailableTill()
    {
        if ($this->AvailableTillDate) {
            return $this->dbObject('AvailableTillDate');
        } elseif ($startDate = $this->getEventStartDate()) {
            $till = strtotime(self::config()->get('sale_end_threshold'), strtotime($startDate->Nice()));
            $date = SS_Datetime::create();
            $date->setValue(date('Y-m-d H:i:s', $till));
            return $date;
        }

        return null;
    }
public function getAvailableTill ( ) { if ( $ this -> AvailableTillDate ) { return $ this -> dbObject ( 'AvailableTillDate' ) ; } elseif ( $ startDate = $ this -> getEventStartDate ( ) ) { $ till = strtotime ( self :: config ( ) -> get ( 'sale_end_threshold' ) , strtotime ( $ startDate -> Nice ( ) ) ) ; $ date = SS_Datetime :: create ( ) ; $ date -> setValue ( date ( 'Y-m-d H:i:s' , $ till ) ) ; return $ date ; } return null ; }
Get the available till date if it is set,
otherwise get it from the parent
Use the event start date as last sale possibility

@return \SS_DateTime|Date|\DBField|null
Get the available till date if it is set otherwise get it from the parent Use the event start date as last sale possibility