Except where, in special cases, a different limitation is prescribed by statute, the following civil actions other than for the recovery of real property can be commenced only within one year after the cause of action shall have accrued:
(1) An action against a sheriff or other officer for the escape of a prisoner arrested or imprisoned on civil process;(2) An action upon a statute for a penalty or a forfeiture given in whole or in part to any person who will prosecute the same; but if such action be not commenced within such year by a private person, it may be commenced within two years thereafter in behalf of the state by the state's attorney where the offense was committed;(3) An action against a person for the violation of a statute, which violation is a petty offense.SDC 1939, § 33.0232 (7); SL 1945, ch 144; SL 1945, ch 145, § 2; SL 1947, ch 153, § 4; SL 1978, ch 165, § 1.