We may not be able to pinpoint the exact date when knowledge advanced to the point that courts were justified in striking down laws excluding women from various occupations. I would tentatively say it happened soon after various states first allowed women to enter many professions in the late 19th century, and experience quickly showed that no great disaster occurred as a result. Still, a good case can be made for a different date. But all a court needs to know is that the relevant date occurred sometime before the day when it has to make a decision in the case before it. And what is true of other forms of sex discrimination is also true of laws banning same-sex marriage.
The rhetorical force of the question, which asks for a precise date, derives partially from an implied Sorites paradox. The paradox of the heap begins with the a single grain of sand, which is clearly not a "heap". If one grain is not a heap, then surely two are not. And if two grains are not a heap, then surely three are not. And so on. There doesn't seem to be any point at which adding a single grain of sand could make the grains into a heap. But a thousand grains of sand surely are a heap.
Philosophers disagree about the solution to the Sorities Paradox, but no one thinks that the inability to specify a precise line entails the conclusion that a thousand grains of sand are not a heap. And so it is in gradual changes in circumstances that eventually lead to a change in the law. The changes are gradual. If a law is consitutional on day one, then surely it is constituitonal on day two, and hence on day three, four, five, and so forth. If this argument were valid, then a gradual change in circumstances could never trigger a legal change, but this obviously is not so.