Whooping cough.

Got myself so worked up thinking I've left it late to get my whopping cough jag! Getting it tomorrow afternoon and am 37 weeks and 3 days tomorrow, will it still protect the baby??