Maternity Leave

If I start a new job while pregnant, am I eligible to take maternity leave when the baby is born, even if I will have been there less than 1 year? I know I may won’t be eligible for FMLA, but I’m curious to know if I’ll be able to take unpaid time off.