Count employment through the last employment date
Both the hire date and last employment date count. Use the final date of your employment relationship agreed with your employer. This can differ from your last day at work, especially if you take leave before departure.
The retirement date used in the calculation is the following day. Employment through October 7 therefore uses October 8 as the retirement date.