I created a notebook with companies that just released earnings, in particular I would like the date in the index to be the first day that the earnings news affected the market, aka asOfDate (say if the earnings were released yesterday after market hours, the asOfDate would be today). Factset provides such a date which I used in the notebook below, but I am having the following problem. I have a column that computes that number of days between today and since the asOfDate, called numDaysSinceRelease. But even when the numDaysSinceRelease is equal to zero, I still see a difference of 1 day between the index date and the as of date. Is there a way to make sure that if asOfDate is equal to 0, that this date equals the date in the date column in the index?
An example: the ticker 'CMD' has and asOfDate of: 2018-05-31 and numDaysSinceRelease = 0. But the index date shows June 1st. I would like CMD to be in the row for 5-31.