Pregnancy test

Can I take a pregnancy test 4 days before my period is due?