I agree with what @Thomas S. describes. A lease is a contract, and my property is not a hotel where I charge on a per-night stay. If the contract says that the tenant's obligation to pay rent is until day X then this is exactly what the tenant will have to do - simply also because I keep providing the tenant with access to the unit until that very day too. Typically a lease term goes till the end of the month. But, of course, that can be different and obviously depends on what's written in the lease agreement.
Now, if tenant decides to move out prior to day X then this does not end my obligation to keep providing him with access to the unit. Since I still have that obligation, tenant still has their obligation to pay rent. It's a bit similar to them going away on vacation and not wanting to pay rent for that time because they are not on the premises. ;-) Yeah, right, good luck with that idea!
Having said that, I would (need to) pro-rate rent if I had a tenant ready to move in prior to day X. As a matter of fact, I have done it that way quite a few times: new tenant gets monthly rent pro-rated for the days he actually lives there and old tenant pays till the day prior to the one the new tenant moves in. Irrespective of when the old tenant moves out.
But the above described is a new agreement between two contracting partners (here: landlord and tenant) to modify the existing agreement (= lease) and nothing else but the rescission of the lease agreement based on this new agreement.
Long story short: anything can be done between two contracting parties if they agree (barring some exceptions via compulsory law, of course).