When a seller gets a leaseback it is (usually) between 3 days and 60 days. We are seeing a lot more seller leasebacks in this seller’s market. It is a legally binding lease and drawn up as a separate document from the purchase contract. Post occupancy agreements get very popular during a crazy seller’s market. 
It is a nice tool for sellers if they are trying to find a home in the area when inventory is low. Possession and close actual happen on closing date then the new buyer becomes the landlord of the seller.