You both are correct, it all depends on if you are long or short on a stock. If you are shorting then it’s on the settlement date verse if you are long then it’s on the transaction date.
The last day is the 31st but your shares take three days to settle. They have to be out of your account by the 31st so you have to subtract the 3 days to settle from it which makes the last day you can sell is the 29th.