Okay, so it's Saturday evening (as the story begins). The criminal has been sentenced to death by hanging. The judge is putting some final details on the sentence.
"You will be hung at noon some day during this coming week: by next Saturday afternoon you will be dead. You will not know until the morning of your execution that it will be your last."
The prisoner is lead away to what is quite a nice cell really where he, not having a whole lot else to do, thinks for a bit.
"I can't be executed Saturday, because if I'm still alive Friday afternoon, I'll know when I will be executed before the morning. So that rules out Saturday. But if I'm still alive Thursday afternoon, then it means I'll have to be executed on either Friday or Saturday, and I've already ruled out Saturday, so it has to be Friday. But again I'll know when I'll be executed before the morning. But if I'm still alive Wednesday afternoon..."
Suffice it to say he rules out being executed on any day of the week as being a violation of the judge's sentencing. He can't be executed on Saturday, because he'll know by Friday; he can't be executed on Friday, because he'll know by Thursday.... He goes to bed, comfortable in the knowledge that logically he cannot be hung on any day of the week and the sentence cannot be carried out.
Wednesday morning he's taken to the gallows. Quite unexpectedly.