There are two questions often asked in such situations. One, whether the employee has worked for 80 days immediately preceding the expected date of delivery, and two, whether these 80 days are in the 12 months immediately preceding the expected date of delivery. The answer to the first question would be YES, but the answer to the second question need not be positive.
Suppose you have an employee who joined the company some five years back. She applies for maternity leave now but absents herself from work, and it is expected that she may not complete 80 days in the 12 months immediately preceding the expected date of delivery. She can be denied maternity leave because she has not worked for 80 days in the 12 months immediately preceding the expected date of delivery. If you narrate the same principle to someone who has joined, say, some six months back, she cannot demand the leave as a right.
In a situation where the employee is covered by ESI, the employee would get the benefits only if she has contributed for a certain number of days (70 days) in TWO consecutive contribution periods (of six months each). Here, it is one year specific.
My observation and interpretation of the law may be wrong, but I take it because there seems to be no relevance to "in 12 months immediately preceding..." in the Act if we just consider 80 days working (that too including holidays, etc).