The law requires residence throughout the year immediately before the application. Short holidays are normally fine; a long stay abroad restarts this year.