I am due on 1 Dec and have been told that June and July are my qualifying months. I think i looked on the DWP website and it's something like the two paydays prior to the 25th week which for me is the middle of August. It isn't quite that straightforward though and is affected by whether you are paid weekly or monthly so you need to check the exact wording and work it out very carefully and try to get your pay section to put in writing that they agree with you. Also beware certain benefits such as childcare vouchers which will reduce your maternity pay if you do not stop them for the qualifying period.
bettybets - they seem to have gone out of their way to make it as confusing as possible. As I understand it, it's calculated based on the AVERAGE of the 8 weeks prior to the 15th week before your Expected Week of Confinement (or EWC). So if your due date is 7/10/09 (as mine is!), then the week just gone was the 15th week before your EWC. Your employer will take an average of your weekly pay in the 8 weeks before that, so if you had a payrise in those weeks, your average weekly pay will be slightly lower than your current pay. Likewise any payrise you get between now and the start of your maternity leave won't count at all.
Statutory Maternity Pay is 90% of your average weekly earnings for the first six weeks of your maternity leave and then a fixed amount (I think about £123) up until 39 weeks of maternity leave (and then nothing after that, although you're allowed to be off for a total of 52 weeks).
Hope that makes sense. They seem to have changed the rules recently as it used to be that SMP was calculated on the average weekly earnings in the 26 weeks before the 15th week before EWC (phew!), so changing it to 8 weeks makes it a bit easier.