No, they will look at that last 5 years, assuming you are not the spouse/CP of a British Citizen. You also have to have settled status for at least 12 months.
Absences during the qualifying period
Where an applicant has spent more than the 450 day for section 6(1) applications, or 270 days for section 6(2) applications, outside of the UK during the qualifying period you must consider exercising discretion if they meet the other requirements.
Where the applicant exceeds the permitted absence by 30 days or less you must exercise discretion unless there are other grounds on which the application falls to be refused.
Where the applicant has absences of between 480-900 for applications under section 6(1) of the British Nationality Act 1981, or 300-540 for applications under section 6(2) and otherwise meets the requirements you must only consider exercising discretion where the applicant has established their home, employment, family and finances in the UK, and one or more of the following applies:
• at least 2 years residence (for applications under section 6(1)), or 1 year (for applications under section 6(2)), without substantial absences immediately prior to the beginning of the qualifying period. If the period of absence is greater than 730 days (for section 6(1)) or 450 days (for section 6(2)) the period of residence must be at least 3 or 2 years respectively
• the excess absences are the result of:
o o postings abroad in Crown service under the UK government or in service designated under section 2(3) of the British Nationality act 1981. accompanying a British citizen spouse or civil partner on an appointment overseas the excess absences were an unavoidable consequence of the nature of the applicant’s career, such as a merchant seaman or employment with a multinational company based in the UK with frequent travel abroad exceptionally compelling reasons of an occupational or compassionate nature to justify naturalisation now, such as a firm job offer where British citizenship is a statutory or mandatory requirement
• •
Where an applicant’s absences exceed those covered above it is highly unlikely that discretion would be appropriate. You should normally refuse the application and advise them to re-apply when they are able to bring themselves with the statutory requirements, unless there are specific circumstances that warrant exceptional consideration at a senior level.