Yeah, today is the last day to buy.
Correct with the record date as well. However, I am pretty sure T+3 comes into play when it comes to record date. So if you sell 2 days before the record date, you should still be eligible for the entitlement. Please call up your broker to confirm.