The good behavior of any person who commences a sentence of confinement in a county jail for a fixed term of imprisonment after January 1, 1987 shall entitle such person to a good behavior allowance, except that: (1) a person who inflicted physical harm upon another person in committing the offense for which he is confined shall receive no good behavior allowance; and (2) a person sentenced for an offense for which the law provides a mandatory minimum sentence shall not receive any portion of a good behavior allowance that would reduce the sentence below the mandatory minimum; and (3) a person sentenced to a county impact incarceration program; and (4) a person who is convicted of criminal sexual assault under subdivision (a)(3) of Section 11-1.20 or paragraph (a)(3) of Section 12-13 of the Criminal Code of 1961 or the Criminal Code of 2012, criminal sexual abuse, or aggravated criminal sexual abuse shall receive no good behavior allowance. The good behavior allowance provided for in this Section shall not apply to individuals sentenced for a felony to probation or conditional discharge where a condition of such probation or conditional discharge is that the individual serve a sentence of periodic imprisonment or to individuals sentenced under an order of court for civil contempt.
Such good behavior allowance shall be cumulative and awarded as provided in this Section.
The good behavior allowance rate shall be cumulative and awarded on the following basis:
The prisoner shall receive one day of good behavior allowance for each day of service of sentence in the county jail, and one day of good behavior allowance for each day of incarceration in the county jail before sentencing for the offense that he or she is currently serving sentence but was unable to comply with the conditions of pretrial release before sentencing, except that a prisoner serving a sentence of periodic imprisonment under Section 5-7-1 of the Unified Code of Corrections shall only be eligible to receive good behavior allowance if authorized by the sentencing judge. Each day of good behavior allowance shall reduce by one day the prisoner's period of incarceration set by the court. For the purpose of calculating a prisoner's good behavior allowance, a fractional part of a day shall not be calculated as a day of service of sentence in the county jail unless the fractional part of the day is over 12 hours in which case a whole day shall be credited on the good behavior allowance.
If consecutive sentences are served and the time served amounts to a total of one year or more, the good behavior allowance shall be calculated on a continuous basis throughout the entire time served beginning on the first date of sentence or incarceration, as the case may be.
730 ILCS 130/3