Shelf life of car battery

A stored battery should last longer than an identical one under the hood if it is kept in a cool place and kept charged. You should ideally have a float charger hooked to it. If it becomes discharged, the plates will sulfate. It may be recovered with a relatively high tech charger. Discharged batteries are also subject to freezing.

Small UPS (Uninterruptible power supply) chargers are designed for some sort of sealed or valve-regulated (recombinant) battery, gel cell or AGM (absorbed glass mat). They do not have the correct float voltage for a flooded cell automotive battery and are not ideal.