Which verb tense refers to an action completed before a set time in the future? Which verb tense refers to an action completed before a set time in the past?
Answer to the first part of your question is Future Perfect tense (will have done)
Example: We are late. Iexpect the film will already have started by the time we get to the cinema.
The second situation requires use of Past Perfect tense (had done)
Example: When I arrived at the party Tom was not there. He had already gone home.