
60 Ill. App.3d 46 (1978)
376 N.E.2d 454
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
GARY D. JONES, Defendant-Appellant.
No. 14724.
Illinois Appellate Court  Fourth District.
Opinion filed May 19, 1978.
Richard J. Wilson and Edward R. Green, both of State Appellate Defender's Office, of Springfield, for appellant.
Paul C. Komada, State's Attorney, of Charleston (Robert C. Perry and Jane F. Bularzik, both of State's Attorneys Appellate Service Commission, of counsel), for the People.
Cause remanded.
Mr. PRESIDING JUSTICE GREEN delivered the opinion of the court:
After trial by jury in the circuit court of Coles County, defendant Gary Dean Jones was found to be guilty of the offenses of disorderly conduct, resisting arrest, and two separate charges of aggravated battery. The court imposed a single sentence of 3 years' probation subject to several conditions including the requirement that defendant spend the last 6 months of the sentence in the county detention center. The trial judge indicated to the defendant that the court might consider vacating the condition of imprisonment if the defendant performed well in an alcohol treatment program in which he was to participate.
The sole question raised on appeal is one that was never raised or considered at the trial level. Defendant now maintains that he is entitled to credit against the time he must spend in the detention center for the time he spent in jail prior to sentencing.
Section 5-8-7(b) of the Unified Code of Corrections (Ill. Rev. Stat. *47 1975, ch. 38, par. 1005-8-7(b)) provides that when a defendant is sentenced to imprisonment he shall "be given credit on the maximum term and minimum period of imprisonment for time spent in custody as a result of the offense for which the sentence was imposed." The commentary of the group drafting the code states that the "crediting principle is intended to be applied to determinate as well as indeterminate sentences of imprisonment" (Ill. Ann. Stat., ch. 38, par. 1005-8-7, Council Commentary, at 514 (Smith-Hurd 1973)). On its face, the section appears to be applicable only to sentences of imprisonment and not to those of probation. Defendant claims, however, that by analogy to the ruling in People ex rel. Herring v. Woods (1967), 37 Ill.2d 435, 226 N.E.2d 594, the section is applicable to periods of incarceration imposed as a condition of probation and that he is entitled to the credit.
In Woods, a probationer whose probation sentence was conditioned upon his spending the first year in jail brought a petition for writ of habeas corpus during that first year while he was still in custody. He alleged that he had spent 53 days in jail prior to sentencing as a result of the offense, thus entitling him to discharge because with credit for the 53 days, he would have served a year in jail. At that time, the statutory provision for credit for time spent in custody prior to sentencing provided that such credit be applied to a "sentence * * * requiring such person to be imprisoned" in a penal institution (Ill. Rev. Stat. 1965, ch. 38, par. 119-3). The supreme court reversed the trial court's order dismissing the petition on motion. It concluded that the legislature intended the term "sentence" to be applicable to grants of probation where incarceration was a condition because imprisonment rather than release was the essence of the portion of the probation being served in custody.
The Woods court also noted that as applied to that case, the failure to give credit deprived the petitioner of equal protection of the law because: (1) he was in jail before sentencing because he could not afford bail; (2) the trial court could not have taken his prior time in jail into consideration in fixing the amount of time he was required to spend in jail as a condition of probation because it imposed the maximum jail time permissible (Ill. Rev. Stat. 1965, ch. 38, par. 117-2); and (3) the defendant was thus required to spend more time in jail as a result of his offense than he would have had to spend had he been able to afford bail. The court reasoned that the statutory provision in question was designed to eliminate this type of discrimination.
The fact that section 5-8-7(b) of the Unified Code of Corrections is a part of article 8 of chapter 5 of that code which is entitled "Imprisonment" and which appears to be devoted entirely to matters *48 concerning sentences of imprisonment does not require a different result here. The former crediting provision in force at the time of Woods was a part of article 119 of the Code of Criminal Procedure of 1963 (Ill. Rev. Stat. 1965, ch. 38, par. 119) which was entitled "Execution of Sentence" and which appeared to be devoted entirely to sentences of death or imprisonment. Although the language of section 5-8-7(b) stating that the credit shall be applied to the "maximum term and minimum period of imprisonment" appears to be more precise than that of former section 119-3 of the procedural code, the Council Commentary belies a claim that precision was intended.
The thrust of Woods was that credit for prior time in custody was to apply to the portion of subsequent dispositions which involved imprisonment. We do not find any indication that the legislature intended to change that rule. We agree with defendant that the Woods decision is applicable to section 5-8-7(b). As Woods was a habeas corpus proceeding, defendant cannot be ruled to have waived his claim here.
We recognize that here, defendant's prior incarceration occurred not because of his inability to post bail but because his bond was revoked for his commission of a crime while on bail. Woods clearly states, however, that the court's ruling was not limited to the particular facts of that case but was intended to give the statute an interpretation that would prevent it from being subject to due process infirmities under conditions that are likely to arise.
Accordingly, we remand the case to the circuit court of Coles County with directions that the probation order be amended to grant defendant 99 days credit upon the time he is required to spend at the detention center as a condition of his probation.
Remanded with directions.
MILLS and TRAPP, JJ., concur.
