Whenever it has been determined that any provision of this chapter has been violated, prior to filing a warrant or accusation pertaining to such violation, the appropriate authority may serve the owner of the premises on which the violation has occurred with a copy of this chapter, provide such owner with written notice of the violation, and allow such owner a reasonable time as determined by the appropriate authority or his representative, but not exceeding 30 days, in order to permit such owner to avoid prosecution by correcting the condition constituting the violation. For purposes of this chapter, the appropriate official includes an official of the county health department, the animal control officer or a member of the sheriff's department.