Anything Lithium Ion 2-3 years at most.
That's not my experience. I have an old Palm Treo cell phone with a Li-ion battery. It's over 6 years old and still holds a charge like new. Li-ion has offered me the best experience with rechargeable batteries and has changed the way I view the abilities of rechargeable batteries in general.
You may have treated your Li-ion batteries in the wrong way. I can't recall ever letting that Palm Treo go below 40%, and I charge it every night. Some people tell me, even after hearing about my experience, to let that battery be completely discharged. I have to say with all due respect that I certainly will continue treating Li-ion in the same way I've been treating it.