public function get(DateTime $date, DateTime $reference_date = null )
    {
        if (is_null($reference_date)) {
            $reference_date = new DateTime();
        }
        
        $diff = $reference_date->diff($date);
        return $this->getText($diff, $date);
    }
public function get(DateTime $date, DateTime $reference_date = null )
    {
        if (is_null($reference_date)) {
            $reference_date = new DateTime();
        }
        
        $diff = $reference_date->diff($date);
        return $this->getText($diff, $date);
    }
public function get ( DateTime $ date , DateTime $ reference_date = null ) { if ( is_null ( $ reference_date ) ) { $ reference_date = new DateTime ( ) ; } $ diff = $ reference_date -> diff ( $ date ) ; return $ this -> getText ( $ diff , $ date ) ; }
Get string representation of the date with given translator
@param DateTime $date
@param DateTime|null $reference_date
@return string
Get string representation of the date with given translator