Last day of work?

I am going to be quitting my job to be a SAHM. This is my first pregnancy. I have a desk job and don’t mind working as long as possible, but I don’t want to go into labor at work (and don’t want to be generally miserable at work). I know we cannot predict, but would you recommend taking my last day at 38 weeks, 39 weeks, or another week? Thank you!