Shareholders who purchase the stock at least one day before the ex-date are eligible for dividends, as the settlement occurs the following day. However, those buying the stock on the ex-date will not qualify for dividends, splits, bonus issues, or similar benefits.
For more details: Click here