Magistrates may punish breaches of the peace by a fine not exceeding five hundred dollars or imprisonment for a term not exceeding thirty days, or both.