Period

How come I've been getting my period in the beginning of the month then at the end of the month?