I think you will find that it is the contract date that is the important date for realising capital gains/losses. Hence you can sell right up to 30 June