However, in California for example, a tenant shall be provided a 30 notice to vacate if the tenant has resided in the unit less than one year and a 60 day notice shall be provided in the event the tenant has resided in the unit for more than one year when governed by a month-to-month tenancy agreement.
But even in California the 60 day requirement for a tenancy of more than one year has been repealed to a 30 day notice once again. Now if you had a lease for a specific term you would not be lawfully asked to vacate the premises until the termination of said lease unless you breached the lease agreement in some way or the landlord included a clause to be used specifically in the event of a sale of the premises.
Hope I helped a little. Good luck.
I am not an attorney, but I do own a few rental properties. The landlord would have to go to an eviction hearing to get you out, which doesn't take very long.