An is used for words starting with an vowel or with an vowel sound.Then why not
"Y" is not a vowel in the English alphabet. English has just 5 vowels - a, e, i, o, u. So "ye" is not considered a vowel sound.
Sometimes "Y" is also a vowel in English
I think it's pronounced-- "इन अ यर" so 'an year' is not correct.
In a year