You are right in a sense. If a tenant gives 30 day notice on the 8th of January, the lease does not technically end in 30 days on the 8th of February. If rent is due on the 1st of the month and the 30 days end on the 8th of February, the tenant still owes rent for the entire month of February according to state law. Since tenant is paid until the end of February, tenant is entitled to occupy rental. Same as landlord that gives notice, even if notice period ends in the middle of month, tenant is entitled to occupy rental till last day of the month. That's why notice should not be given too early or too late.