This is a US-specific answer. other countries may differ.
For preferred equity, the dividend dates are hardcoded in the prospectus, like for a bond.
But for common equity, there is no obligation to pay any dividends. Once the board votes to pay a dividend on a certain date, to shareholders of record on a certain date, the company must pay. Boards usually try to follow some regular and predicatable schedule, because shareholders appreciate those. But they're not obligated to.
For example, looking at Ashland common equity on Yahoo Finance on November 25, 2022, I see:

Here November 30, 2022 is the ex-date of a dividend that has been announced but not yet paid. This is the only future ex-date data. The ex-date of the next dividend after this one is not and will not be data until it is announced by the board. On November 30, 2022, this ex-date will become historical, and there will be no data until the next dividend is voted by the board.
Likewise for Microsoft November 16, 2022, is the latest data that exists as of this writing.
Of course you can look at the historical data
https://www.nasdaq.com/market-activity/stocks/ash/dividend-history

and assume that the dates will follow the same pattern, but it's just an assumption. Also nothing prevents the board from announcing an extraordinary dividend on some arbitrary date in between if they ever want to. Avoid basing anything on these assumptions, bur rather wait for the actual data to show up.