To be eligible for a buyback offer, the shares should be in the Demat account on the record date. It takes 2 trading days (i.e trading date +2) for shares to be deposited into the demat account and so ideally one should be buying at least 2 days prior to the record date to be eligible for the buyback.