We had a similar, though not quite so last-minute, experience in Spain. I think it was a couple of weeks, despite having set the date months after filing the initial paperwork.
In our case it was the UK authorities that were slow to send the documents I needed, partly, I think, because there wasn't a direct equivalent of what the Spanish ayuntamiento was asking for.