Maternity allowance may be calculated based on the salary of either 3 or 6 full months preceding work cessation.
In other words, if you stopped working in the middle of July, your allowance will be calculated according to your average salary in the months of April to June, or January or June, whichever is higher.
For more information about calculation of maternity allowance, click here.