This depends on the state where you live and the terms of sale. In most states, you must have at least 30 days notice of either lease changes or eviction.
Generally a new owner is subject to the leases that existed at the time of the purchase. Check your lease carefully to see if it addresses the situation.