After the security breach that caused the death of Professor Dumbledore classes are cancelled and exams are postponed. Parents arrive over the next several days to take their children home; among the students to leave are the Patil twins and Zacharias Smith.
Seamus Finnigan’s mother also wants her son to leave Hogwarts, but Seamus refuses, which results in a shouting match in the entrance hall. The argument is resolved when Mrs. Finnigan agrees to let Seamus stay for Dumbledore’s funeral. She heads to Hogsmeade to wait for the funeral, but she has a hard time finding a place to stay because the town is already full of witches and wizards wishing to pay respects to the late Headmaster.
If the Ministry (aka Voldemort) hadn't made Hogwarts attendance compulsory, then how many students would have returned to Hogwarts after Dumbledore's death?
The date is derived from the fact the funeral was three days after Dumbledore's death, which took place on June 30, according to Pottermore (and the fact that Scrimgeour brought Harry, Ron, and Hermione the bequests from Dumbledore's will on July 31, which is stated to be 31 days after Dumbledore's death in DH7.)