Spotting 4 days before af due

My cycles are typically between 27-29 days; however this month I started spotting on cycle day 23. Spotting was on and off for 2 days and then pretty steady for at least one day which I assumed was af coming early. Spotting stopped for a day and a half but now I'm spotting again. I have no idea what is going on! I'm assuming that I will count this is as af. Been ttc for 2 years and this has never happened. Has this happened to anyone? Was it af or ib? Thanks in advance for any advice/input!