mimi - legally you can work until your EDD and go from work to the hospital and give birth. Legally your company cannot make you take earlier (of course they can start to apply subtle pressure so you go earlier, but if you know your rights you can tell them where to get off - as diplomatically as possible).
Companies may however request a letter 4 weeks before your EDD to confirm you are fine to continue working, as they also do not want to be liable for any workman's compensation issues.
If your job puts strain on your pregnancy i.e. you stand, or what ever, it is the company's responsibility to alter your responsibility to reduce the risk to you and your unborn child (unfortunately most opt not to and pregnant moms leave work earlier than they actually can afford to.)
Minimum conditions of employment allow for 4 months unpaid maternity leave when it starts is totally up to you. Of course it is up to the discretion of the company whether they give more or decide to pay you.
With Connor I stopped work on Friday and gave birth on the Monday, Georgia I took two weeks officially, but was actually on sick leave for about a month anyway as I was quite sick, Isabelle I took two weeks as well.