Maternity leave

Alexis
What's the LATEST I should tell my work that I'm pregnant? My work usually asks for 1-2 weeks notice for vacations but I'm not sure about maternity leave. Plus I'm nervous to tell them! Any suggestions??