Kathy is correct that it must close, but that includes funding.
If it doesn't fund until Thursday, July 1, you failed to meet the criteria. (Even if you did sign all the papers before midnight)
So, don't wait until the last week of June to close. Besides the escrow offices being jammed, you may find the lender unable to fund the transaction until after the deadline.
When the November 30 deadline was in place, a little before Halloween you could not get some types of assistance because the paperwork was taking 3 weeks and lenders were scheduling in December.