Dear Sir/ Madam,

Please kindly advise which of the following statements (a or b) is correct if it is to be included in a written report.

a. It is a 18-month contract.
b. It is an 18-month contract.

I am not sure if the use of an article (a or an) within a written statement is still subject to the first letter of the word next to the article (i.e. vowel: a, e, i, o, u) even a short number (e.g. 18) rather the whole word (e.g. eighteen) is adopted.

Your early advice will be highly appreciated. Thanks a lot for your help.

b. It is an 18-month contract. The rule holds in both speaking and writing.
Thank you.