The applicable statue has been accurately cited as
California Civil Code § 1946. The specific part of § 1946 that governs this
specific question is as follows:
"as to tenancies from month to month either of
the parties may terminate the same by giving at least 30 days' written notice
thereof at any time and the rent shall be due and payable to and including the
date of termination."
“California law
differs because a 30-day notice is permitted any time during the month,” with
the final date of occupancy 30 days from the date the notice is delivered to
the landlord, according to the California Department of Consumer Affairs.
https://homeguides.sfgate.com/landlord-rights-30-day-notice-8280.html
Calculating the 30 Day Notice Period
In calculating the 30 day notice period, do not count
the day you serve the notice. For example, if you serve the notice on a Monday,
then Tuesday is the first day. You need to count all days including weekends.
If the last day falls on a Saturday, Sunday, or court holiday, the tenant has
until the next business day to move out or quit the property.