A person who is a resident of California within the meaning of this chapter is a lawful resident of the county wherein he applies for aid, if he has resided therein continuously for one year immediately preceding his application for assistance. If the applicant has no such residence, the county wherein he last resided continuously for one year immediately preceding his application shall be responsible for his support. If the applicant has no such year’s residence within three years preceding application, that county shall be responsible for his support wherein he was present for the longest time during the three-year period. Time spent in a public institution or on parole therefrom or in a private charitable institution shall not in any case be counted in determining the matter of county residence.