Your due date is always 40 weeks after your last period (or with IVF, the date of EC). If you have a planned section at 36 weeks, it will be four weeks before your 40 week date.
I was supposed to leave at 32 weeks, but hadn't quite finished up and had a high profile speaking engagement at 32+3. My early labour pains started just as I stood up to speak - I was introducing the most senior judge in the country to 300 lawyers - so I huffed and puffed my way through it, went home and delivered twins (actually it was 4 days later, but it sounds better that way)!
I wished I'd stopped at 29 weeks (which is the earliest permitted by law). I feel that I would have avoided such an early delivery if I had taken it a bit easier. Even if you don't start maternity leave that early, you could ask to shorten your hours and reduce your workload over the next few weeks. Most employers would be willing to agree that.