Modal + perfect infinitive
Incorrect : You should do it yesterday.
Correct : You should have done it yesterday.
Incorrect: It might rain last night.
Correct . It might have rained last night.
Note: Some modals appear to have past tense forms (could, should, might) but these are not usually used with a past meaning in a simple sentence. These verbs are followed by a perfect infinitive to talk about the past. One exception is ‘could’ which can be used with a past meaning with a past time reference.
For example:
I could swim at the age of five.