Testing?

How many days after sex is accurate to test if i have irregular periods?