Passage: McG signed on to direct, as the first two films were among his favorites, and he had even cast Robert Patrick (who played the T-1000) in his films. Though he was initially unsure about "flogging a dead horse," he felt the post-apocalyptic setting allowed the film to be different enough so as not to be just an inferior sequel. The idea that events in Terminator 2: Judgment Day and Terminator 3: Rise of the Machines altered the future allowed them to be flexible with their presentation of the futuristic world. McG met with the series' co-creator James Cameron, and, although he neither blessed nor denigrated the project, Cameron told the new director he had faced a similar challenge when following Ridley Scott's Alien with Aliens. He maintained two elements of the previous films; that John is an outsider to the authorities, and someone of future importance is being protected, and in this film, it is Kyle Reese.The first full screenplay for the film was written by Terminator 3 writers John Brancato and Michael Ferris, who received full screenplay credit. Paul Haggis rewrote Brancato and Ferris's script, and Shawn Ryan made another revision three weeks before filming. Jonathan Nolan also wrote on set, which led to McG to say, "I would have to characterize Jonah as the lead writer of the film." In response to whether or not Nolan would receive a writing credit for his contribution, McG went on to say, "I don’t know how the WGA rules work, but honest to goodness, we did the heaviest lifting with Jonah.” Nolan contributed to the film after Bale signed on and created Connor's arc of becoming a leader. However due to the 2007–08 Writers Guild of America strike, Nolan had to abruptly leave the project due to another commitment. Anthony E. Zuiker contributed to the script as well. So extensive were the rewrites that Alan Dean Foster decided to rewrite the entire novelization after submitting it to his publisher because the compiled shooting script was very different from the one he was given beforehand.

Question: How long before filming took place was the script revised?
three weeks