Since bankruptcy is in federal court, and under federal law, NOT STATE LAW, the residency requirements are the same for whatever state you live in. The response of 30 days was for residency under STATE LAW. The federal bankruptcy law says (like the previous responder stated) that as long as you live in the state a majority of 180 days, you can file there.
The venue rules are stated in 28 U.S.C. 1408. What is required is that the debtor's "domicile, residence, principal place of business in the United States, or principal assets in the United States" be in the filing district for the past 180 days or for a longer portion of the last 180 days than in any other district.
If someone moves from the Northern District of state A to the Southern District, venue is proper in the Southern District after 91 days. If someone moved from state to state, managing to hit all 50 states in the course of 180 days, whatever state they'd been in the longest would be the right place to file.