public static function fatorVencimento(\DateTime $data)
    {
        $dataBase = new \DateTime("1997-10-07");

        return (int)$data->diff($dataBase, true)->format('%r%a');
    }
public static function fatorVencimento(\DateTime $data)
    {
        $dataBase = new \DateTime("1997-10-07");

        return (int)$data->diff($dataBase, true)->format('%r%a');
    }
public static function fatorVencimento ( \ DateTime $ data ) { $ dataBase = new \ DateTime ( "1997-10-07" ) ; return ( int ) $ data -> diff ( $ dataBase , true ) -> format ( '%r%a' ) ; }
Calcula o fator vencimento.

@param  \DateTime $data
@return integer
Calcula o fator vencimento .