If you are considering selling now, in April and the 2 years are up in June, chances are that it sells after June and this is a moot point.
Just put it on the market 30-45 days before the date where you hit the 2 year mark and if you are lucky enough to get a quick sell make sure that the buyer agrees to close after that date.