How long before your due date will you leave work?

Lainey • Due with Baby #1 Nov. 2016!
How many days/weeks/months did you or do you plan to go out on leave? I keep thinking I want to work up until a week before my due date but this is my first pregnancy, so I really have no idea what to expect!