For public transit in my city they have an official website where you can type in where you are and where you want to go and it plan it all for you. Can choose from arrive asap to picking a time when you want to depart or a time you want to arrive. This has been operational since 2002.
More recently Google Maps has the same functionality and it will work in many cities across the world.