The short answer is that it takes 120 days to terminate a tenancy, unless the tenant is at least 62 years old or is “disabled” (as defined by the Ellis Act and housing discrimination law), in which case, it takes a year.
The longer answer:
In general, month-to-month tenancies in California can be terminated on thirty days’ notice. Residential tenancies older than a year require sixty days instead. This is still true for any non-fault-based eviction in a city with eviction control. However, in 1999, the Ellis Act was amended so that tenants receive at least 120 days notice, with the option to extend. And, if at least one tenant claims an extension, the landlord can extend the withdrawal date of every other unit to match. (In other words, the landlord can “go out of business” as to the entire building at the same time.)
Of course, this just answers the question of how much notice your tenant receives before their tenancy is terminated. In San Francisco, the Ellis Act has become more of a political issue than a legal one. (Ellis-displaced tenants receive priority affordable housing, and they have received city-funded legal defense long before the passing of Proposition F.) More often than not, tenants hold over after their tenancies are terminated, aiming to defeat the eviction lawsuit and preserve their tenancy. Sometimes they are successful.
Even when the landlord is successful, they should expect to add five months of intense litigation to their timeline to recover possession.
Preparing for an Ellis Act eviction may require a review of the history of the tenancy (including changes in occupancy), clarification of the form of record ownership, changes in insurance coverage, and even refinancing, if the lender won’t allow Ellis evictions. In other words, the best time to start this process was yesterday. The second best time is right now.