I agree with cobra302. If it was an issue, it wouldn't make sense to have accessories that work with the iPhone (such as alarm clocks that have a dock) that charge it while docked.
My last phone, a MotoRazr V3 had a LiIon battery. I left it plugged in at night for the two years that I used it. Each battery only held a charge for the first year of its life. I replaced the battery once at Sprint. The salesman told me the battery would fail to hold a charge in a year if it was left plugged in all or most of the time.
I'm doing the same thing with my 3GS and hoping for the best, and AppleCare as a back up.
My last phone, a MotoRazr V3 had a LiIon battery. I left it plugged in at night for the two years that I used it. Each battery only held a charge for the first year of its life. I replaced the battery once at Sprint. The salesman told me the battery would fail to hold a charge in a year if it was left plugged in all or most of the time.
I'm doing the same thing with my 3GS and hoping for the best, and AppleCare as a back up.
it's not time based. batteries have a total number of charges life.
with any rechargeable battery it is a good idea to once in a while drain it down and fully charge it. If you are concerned with leaving it charged then get something like the Luckypacks i-up 5400 that will stop charging the phone when it is at 100% I use one and love it. From the i-up I get 3 full charges or a ton more partial charges.