He mentioned that he had been in court the previous day.
meaning, I am saying this to someone else, that he (someone), sometime after the event took place, mentioned it, that: "I was in court the previous day". (he went to/was in court yesterday)
now, how would I convey the meaning that he mentioned it Yesterday? how to specify its time? would it be like:
He mentioned that he was in court the previous day. (by avoiding the backshift step)
or: He mentioned that he had been in court, the previous day. (by using punctuation)
I don't know if I'm right about it, but I suppose I am complicating the time sequences.
Move the time adverbial up to the front to make it modify "mentioned", and don't use "the previous day", use "yesterday" since that is the word that means "the day before today".
Yesterday he mentioned that he had been in court.
He mentioned yesterday that he had been in court.
You can place time adverbials before the subject, after the verb, or after the predicate. But if the predicate is a clause, that last option is usually at least ambiguous, so you should place the time word nearer the verb that it modifies.
Yesterday, he mentioned that he had been in court.
As simple as that.