It's State specific. Where I got divorced, there was a six month waiting period to file, plus a 30 day waiting period after the judge signed it for it to become final, which is designed for either party to appeal the decision more easily.
We waived our right to the appeal period, a form that we filed with the complaint and response, and it was final/effective immediately.
I have known people who have been willing to perjure themselves in court and lied about their date of separation to get around the waiting to file. Of course, both spouses and potentially a witness need to all agree to lie in court for that to happen.