Above is the California Handbook. Below is an excerpt from that book.
You can give the landlord notice any time during the rental period, but you must pay full rent during the period covered by the notice. For example, say you have a month-to-month rental agreement, and pay rent on the first day of each month. You could give notice any time during the month (for example, on the tenth). Then, you could leave 30 days later (on the tenth of the following month, or earlier if you chose to). But you would have to pay rent for the first 10 days of the next month whether you stay for those 10 days or move earlier. (Exception: You would not have to pay rent for the entire 10 days if you left earlier, and the landlord rented the unit to another tenant during the 10 days, and the new tenant paid rent for all or part of the 10 days.)198
Have an amazing day!