A battery should last at least a year in your bike's computer ... BUT, I've had at least three batteries die in less time ...
If your battery has only been in the computer head for a few months, then I suppose that the shorter life could possibly have been due to poor storage at the stores from whom I bought them.
Also, there are SOME computer heads which have a back light. No doubt, using the back light has a negative effect on battery life; but, I don't know by how much.
Also, once the battery is installed & the computer is running in "sleep mode" it is draining even if YOU aren't riding.
With a wireless FlightDeck that I have, almost all the functions ceased & I couldn't resolve it for weeks; but, THAT specific computer head worked in a wired harness. I changed the transmitter's battery with no positive effect. It finally occurred to me to try a different FlightDeck computer head in that particular harness -- it worked. So, I finally tried putting a new battery in the oddly functioning computer head & everything fuctioned properly, again!
A dying battery may not be your problem, but you may as well buy a new one & see if that "fixes" it (because your current battery will probably die in the middle of this Summer & that could be really annoying -- BETTER TO START THE SEASON WITH A 'NEW' BATTERY), or not -- IF NOT, then take the "new" battery out & check your warranty for a replacement.