My son's passport ran out when we went on holiday. We only realised when boarding at the airport :-( They made a few phone calls to see if he'd be allowed to travel, but no such luck.
Managed to get an appointment at the Newport passport office, 5 days later, and got him a passport on a 'same day' basis.
Finally got to our destination, five days later and after another disaster (flight had to make an "emergency landing"!) only to be told that my husband, who had three months left on his passport, would not be allowed into the country, as you need six months.
Good luck with getting an appointment before Thursday and don't forget you'll need someone to sign the back of your photos before then too.