Residency is a term of art in the law, and its definition varies among jurisdictions. In some states, for some purposes, your intent controls. For example, in California, residency is defined as an intent to live or be located in California on "more than a temporary or transient basis."
Residency for Filing for Divorce
Every state sets out in its statutes some period of residency before a couple can divorce in its courts. These range from weeks to years. Generally, if one spouse fulfills the residency requirements, either spouse can file a petition for divorce in that state.
Examples of State Residency Requirements
Nevada requires six weeks' residence before a couple can file for divorce, while California statutes require six months. New York mandates continuous physical presence for two years immediately before filing a divorce action. If a couple married in New York state or lived there as a married couple, the residency period is one year.