Harry and the others in his Year sit their Ordinary Wizarding Level (O.W.L.) examinations. The first day is Charms, with a written exam in the morning and a practical exam in the afternoon.
O.W.L.s occurs over the span of two weeks. Here’s the full schedule.
First week of O.W.L.s: Monday – Charms (written exam in the morning and practical in the afternoon); Tuesday – Transfiguration (written exam in the morning and practical in the afternoon); Wednesday – Herbology; Thursday – DADA (written and practical), Friday – Ancient Runes (Hermione sits this, but Harry and Ron do not.)
Second weeks of O.W.L.s: Monday – Potions (written exam in morning and practical in afternoon); Tuesday – Care of Magical Creatures (practical in afternoon); Wednesday – Astronomy and Divination (Astronomy theory in morning, Divination in afternoon, Astronomy practical at night); Thursday – History of Magic (at 2:00 PM)
Chapter 31, in which the O.W.L.s are taken, starts from the day after Gryffindor's Quidditch Victory. That event happened, according to the books, the last weekend of May. The Saturday of the last weekend would actually have been May 25th, but that date would move the exams up too far. We're going to go with the Real World calendar date of June 1 for the Quidditch Final, which means that chapter 31 begins on June 2. The chapter then goes through probably a week of studying for O.W.L.s and then almost two weeks of exams.
We do know that Harry's last exam day, on which the next few chapters take place, is Thursday of his second week of exams. Pottermore gives the date as June 18, however that date doesn't make sense by the actual calendar and the Real Life dates of the Easter holidays in 1996. Therefore we're going with the more accurate date of the exams starting on Monday the 10th and the final day -- and the date of the Battle of the Department of Mysteries -- being June 20th.