Legal Permanent Residents (LPRs) commonly ask about when is the earliest time they can apply for U.S. citizenship. The LPR may apply for citizenship 90 days before the date when she or he meets the continuous residence requirement for naturalization purposes. For a LPR with no special circumstances (such as being currently married to a U.S. citizen or having served or currently serving in the military), that requirement is 5 years.
In almost all cases, if you leave the United States for a year or more, you have disrupted your continuous residence. This is true even if you have an I-327 re-entry permit (this permit allows you to keep your LPR status). However, if you return within 2 years, you can count some of that time towards your continuous residence requirement –specifically, the last 364 days of your time out of the country (1 day less than 1 year).