Oops, yes back to the original question.
We are looking at 20 years or so before all new manufacture of petrol and diesel engine cars is banned.
(This may change as diesel for one is now cleaner than ever, and if you note some research current standard diesel engines leave the air cleaner. Early days on that research but interesting.)
By then there will still be millions of cars and light vehicles using those fuels. It will take a long time for the market to deplete, fossil fuels will be with us for a long time yet.
I would think we are looking at 30 years plus before we have to worry and alternatives are already around now.
Subject to change of course, we are reliant on the whim of government and the power of lobbyists.
Iain