Maternity leave uk

k

If someone could help!!!

I am starting a new job next month but just found out I’m pregnant. How long do u have to work in a company to receive maternity pay.

Thanks