Every person is guilty of a forcible detainer who either—(1) By force, or by menaces and threats of violence, unlawfully holds and keeps the possession of any real property, whether the same was acquired peaceably or otherwise; or—(2) Who in the nighttime, or during the absence of the occupant of any real property, enters thereon, and who, after demand made for the surrender thereof, refuses for the period of three days to surrender the same to such former occupant. The occupant of real property within the meaning of this subdivision is one who for the five days next preceding such unlawful entry was in the peaceable and undisturbed possession of such real property.