how to determine phone generation (M1........M10) ?

I want to buy a new battery for my old HTC one cell phone, so I need to indicate phone generation to look for the battery. In phone setup I can see : name, model number, IMEI, serial number, IP, BUT never found the generation information ( M1.......M10), even official web page could not help.