Whenever the defendant is sentenced to imprisonment for the violation of a city ordinance, he may be put to work for the benefit of the city, if it is determined that adequate supervision is available, for the term of his imprisonment, and when committed for the nonpayment of a fine, or costs, for the violation of any ordinance, he may also be put to work for the benefit of the city, and shall be credited on such fine and costs, fifteen dollars ($15.00) per day for each day he shall work.
W.S. 5-6-211