Hi, This happened the other day to my iPhone 3GS. I purchased the iPhone on March 8th 2010, it's barely 2 years old!!!
I spoke to apple support re this at the end of last week and I am shocked at the explanation I got from them!!!
I was told initially that there were a limited number of cycles that the batteries were designed to last. When I asked for documentary evidence of this, I was told that they did not have this documentation and that in fact, the battery that they were referring to was the MacBook pro battery!
I was then told that the battery had expanded as this was a 'safety' feature. Again, I asked for a copy of the manufacturers documentation and battery specs for the model of battery that is fitted to the iPhone 3GS and again, Apple were unable or unwilling to supply this. I was then given the postal address for apple customer relations in Cork and was also advised to contact O2 as the phone was purchased there.
Lookm, batteries do not behave in this manner, I also expect a product, that costs hundreds of euros to purchase to last longer than 2 years!!!!
Come on apple, you can do better than this!!