public function formatCompletion(\MUtil_Date $dateTime)
    {
        $days = abs($dateTime->diffDays());

        switch ($days) {
            case 0:
                return $this->_('We have received your answers today. Thank you!');

            case 1:
                return $this->_('We have received your answers yesterday. Thank you!');

            case 2:
                return $this->_('We have received your answers 2 days ago. Thank you.');

            default:
                if ($days <= 14) {
                    return sprintf($this->_('We have received your answers %d days ago. Thank you.'), $days);
                }
                return sprintf($this->_('We have received your answers on %s. '), $dateTime->toString($this->dateFormat));
        }
    }
public function formatCompletion(\MUtil_Date $dateTime)
    {
        $days = abs($dateTime->diffDays());

        switch ($days) {
            case 0:
                return $this->_('We have received your answers today. Thank you!');

            case 1:
                return $this->_('We have received your answers yesterday. Thank you!');

            case 2:
                return $this->_('We have received your answers 2 days ago. Thank you.');

            default:
                if ($days <= 14) {
                    return sprintf($this->_('We have received your answers %d days ago. Thank you.'), $days);
                }
                return sprintf($this->_('We have received your answers on %s. '), $dateTime->toString($this->dateFormat));
        }
    }
public function formatCompletion ( \ MUtil_Date $ dateTime ) { $ days = abs ( $ dateTime -> diffDays ( ) ) ; switch ( $ days ) { case 0 : return $ this -> _ ( 'We have received your answers today. Thank you!' ) ; case 1 : return $ this -> _ ( 'We have received your answers yesterday. Thank you!' ) ; case 2 : return $ this -> _ ( 'We have received your answers 2 days ago. Thank you.' ) ; default : if ( $ days <= 14 ) { return sprintf ( $ this -> _ ( 'We have received your answers %d days ago. Thank you.' ) , $ days ) ; } return sprintf ( $ this -> _ ( 'We have received your answers on %s. ' ) , $ dateTime -> toString ( $ this -> dateFormat ) ) ; } }
Formats an completion date for this display

@param \MUtil_Date $dateTime
@return string
Formats an completion date for this display