Just exactly when, in Goblet of Fire was Mad-Eye Moody captured and did Barty Crouch, Jr. start impersonating him immediately after that?
According to Wikia, this happened late on August 31st of Year 4, or September 1 - before the first day of school.
The reason for that is that the commotion happened exactly on a day when the gang was supposed to board Hogwarts Express:
(GoF, beginning of Chapter 11) There was a definite end-of-the-holidays gloom in the air when Harry awoke next morning. Heavy rain was still splattering against the window as he got dressed in jeans and a sweatshirt; they would change into their school robes on the Hogwarts Express. (beginning of Chapter 11)
Harry shut his eyes hard and opened them again to make sure that they were working properly. Amos Diggory's head was sitting in the middle of the flames like a large, bearded egg. It was talking very fast, completely unperturbed by the sparks flying around it and the flames licking its ears. "...Muggle neighbors heard bangs and shouting, so they went and called those what-d'you-call-'ems - please-men. Arthur, you've got to get over there -"
Here's Barty's Veritacerum confession from Goblet of Fire, showing that the impersonation started right when Moody was captured:
"You needed Alastor Moody," said Dumbledore. His blue eyes were blazing, though his voice remained calm.
"Wormtail and I did it. We had prepared the Polyjuice Potion beforehand. We journeyed to his house. Moody put up a struggle. There was a commotion.... I was ready to face Arthur Weasley when he arrived to sort out the Muggles who had heard a disturbance. I made the dustbins move around the yard. I told Arthur Weasley I had heard intruders in my yard, who had set off the dustbins. Then I packed up Moody's clothes and Dark detectors, put them in the trunk with Moody, and set off for Hogwarts.