Every municipality may enact, make, amend, revise, or repeal all such ordinances, resolutions, and regulations as may be proper and necessary to carry into effect the powers granted thereto, and to provide for the punishment of each violation thereof by a fine not to exceed the fine established by subdivision 22-6-2(2), by imprisonment not exceeding thirty days, or by both the fine and imprisonment.
SDCL 9-19-3