Any person who has been convicted in a circuit court or in a magistrate court under any criminal provision of this code of a misdemeanor or felony, which is punishable by imposition of a fine or confinement in a regional jail or a state correctional institution, or both fine and confinement, may, in the discretion of the sentencing judge or magistrate, as an alternative to the sentence imposed by statute for the crime, be sentenced under one of the following programs: (3) The community service program under which a sentenced person would spend no time in jail, but would be sentenced to a number of hours or days of community service work with government entities or charitable or nonprofit entities approved by the circuit court. Regarding any portion of the sentence designated as confinement, eight hours of community service work is to be credited as one day of the sentence imposed. Regarding any portion of the sentence designated as a fine, the fine is to be credited at an hourly rate equal to the prevailing federal minimum wage at the time the sentence was imposed. In the discretion of the court, the sentence credits may run concurrently or consecutively. A person sentenced under this program may be required to provide his or her own transportation to and from the work site, lunch and work clothes.