
165 Ill. App.3d 169 (1988)
518 N.E.2d 1068
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
CLARENCE CARTER, Defendant-Appellant.
Nos. 2-86-0808 through 2-86-0810, 2-86-0812 cons.
Illinois Appellate Court  Second District.
Opinion filed January 25, 1988.
*170 G. Joseph Weller and Kim M. DeWitt, both of State Appellate Defender's Office, of Elgin, for appellant.
Fred L. Foreman, State's Attorney, of Waukegan (William L. Browers and Lori J. Miller, both of State's Attorneys Appellate Prosecutor's Office, of counsel), for the People.
Reversed and remanded.
JUSTICE WOODWARD delivered the opinion of the court:
Defendant, Clarence Carter, appeals the order of the circuit court revoking his probation and sentencing him to four concurrent three-year terms of imprisonment. Defendant argues that the court's order was void for lack of jurisdiction and that, in the alternative, the court abused its discretion in sentencing him to the maximum term of imprisonment.
Defendant initially pleaded guilty on April 21, 1986, to two counts of theft (Ill. Rev. Stat. 1985, ch. 38, par. 16-1) and one count of retail theft (Ill. Rev. Stat. 1985, ch. 38, par. 16A-3), pursuant to three separate informations. Defendant elected to be treated as an addict pursuant to the provisions of section 23 of the Alcoholism and Substance Abuse Act (the Act) (Ill. Rev. Stat. 1985, ch. 111 1/2, par. 6323). Prior to sentencing, another information was filed charging defendant with retail theft and unlawful possession of cannabis (Ill. Rev. Stat. *171 1985, ch. 56 1/2, par. 704(b)). Defendant pleaded guilty to these charges, and they were consolidated with the previous charges for purposes of electing treatment as an addict.
On June 11, 1986, the court sentenced defendant to 30 months' probation on each of the four informations, with the condition that he obtain inpatient drug therapy through Treatment Alternatives to Street Crimes (TASC). While awaiting an opening in a TASC inpatient program, defendant attended an outpatient program.
On July 7, 1986, the State filed four separate petitions to revoke probation. The petitions alleged that defendant had committed retail theft on June 3, 1986. After being admonished by the court, defendant admitted the allegations of the petitions. The factual basis for the plea, as given by the prosecutor, recited that on June 3, 1986, defendant took a Mepp's Killer Kit from a Venture store and walked past the cash registers without paying for it. However, a memorandum from the Department of Court Services to the Lake County State's Attorney's office indicated that defendant was arrested on June 23, 1986, and the attendant nontraffic complaint states the date of the offense as June 23, 1986. The information on that charge was sworn to on June 30, 1986, and filed July 1, 1986. Also, a letter from TASC notifying the court of defendant's failure to comply with the rules of the program indicated that he was arrested on June 23, 1986. The court found the factual basis sufficient and revoked defendant's probation.
At the sentencing hearing on July 30, 1986, both the prosecutor and defense counsel recommended that defendant's probation be continued and that defendant be placed in an inpatient TASC program, subject to being held in custody until an opening in such a program occurred. The court, however, found that the likelihood of defendant's complying with the terms of probation was doubtful and sentenced him to concurrent terms of three years in the Department of Corrections on each of the four informations.
Defendant filed a motion to reconsider. At the hearing, the State did not object to the petition. The prosecutor stated that "possibly the opportunity to get him off the streets and into an inpatient facility may be the way to go." The court denied the motion, stating that "[t]he penal system will certainly get him off of drugs, it is in effect an inpatient treatment program." Defendant filed a timely notice of appeal.
 1 Defendant first contends that the trial court was without jurisdiction to enter the order revoking his probation, since the petition to revoke and the prosecutor's recitation of the factual basis both *172 stated that the date of the violation was June 3, 1986. This date was before the defendant's term of probation began. The State responds that other sources show the date of the offense to have been June 23, 1986, and that the court and defense counsel were aware of the actual date.
Subject matter jurisdiction over a defendant on probation lasts only for the duration of the probation. (People v. Martinez (1986), 150 Ill. App.3d 516, 517; People v. Randolph (1981), 98 Ill. App.3d 696, 699, cert. denied (1982), 459 U.S. 857, 74 L.Ed.2d 110, 103 S.Ct. 128.) Furthermore, "it is axiomatic that a defendant must be on probation in order to have his probation revoked and that the acts alleged in the petition to revoke must have occurred during the probation period." People v. Speight (1979), 72 Ill. App.3d 203, 215.
In the instant case, the State argues that the act alleged in the petition did in fact occur during the probation period, although the petition itself contained the June 3 date. Normally, a typographical error in the date of the offense is a purely formal defect which can be cured by amendment. (People v. Koczur (1968), 100 Ill. App.2d 481 (slip op. at 4) (abstract of opinion); People v. Bradley (1966), 70 Ill. App.2d 281, 288.) In People v. Price (1971), 132 Ill. App.2d 733, the court found that defendant was not prejudiced by a misstatement of the date in the indictment where the defense had access to the State's entire file, including grand jury testimony indicating the correct date, and defendant admitted on cross-examination that he was "picked up" for the offense during December 1968, rather than January 1968, as alleged in the indictment. Thus, the incorrect date was merely a formal defect, subject to amendment. (Price, 132 Ill. App.2d at 734-35.) Furthermore, the pleading requirements for a petition to revoke probation are less stringent than those for an indictment or information. (People v. Monick (1977), 51 Ill. App.3d 783, 787.) Formal defects in a charging instrument are waived if not challenged in the trial court. (People v. McBrien (1986), 144 Ill. App.3d 489, 495.) Since defendant did not object to the incorrect date in the trial court, such assertion of error is waived. The formal defect could have been cured by amendment in the trial court had defendant objected to it there.
 2 Somewhat more troubling is the fact that the factual basis related by the assistant State's Attorney also contained the June 3 date. In accepting a guilty plea, however, the court's duty is only to assure itself that a factual basis for the plea exists, not to determine whether the defendant was proved guilty beyond a reasonable doubt. (People v. Cross (1979), 77 Ill.2d 396, 412, cert. denied (1980), 445 U.S. 929, 63 *173 L.Ed.2d 762, 100 S.Ct. 1316; see 107 Ill.2d R. 402(c).) The relevant issues are whether the crime charged has been committed and whether defendant committed it. (People v. Ginder (1975), 26 Ill. App.3d 295, 299.) The court may look to any portion of the record to determine the factual basis for the plea. (Ginder, 26 Ill. App.3d at 299.) A voluntary plea of guilty precludes the necessity for proof. (People v. Love (1972), 6 Ill. App.3d 577, 582.) In this case, defendant admitted the allegations of the petition. The record contains the complaint, the letter from the Department of Court Services, and a letter from TASC, all of which contained the June 23 date. Defense counsel twice acknowledged that the offense took place approximately two weeks after defendant was placed on probation. Under these circumstances, the circuit court could properly conclude that not only did defendant commit the offense in question, but that he did so during the duration of probation. In summary, the misstatement of the date was purely a formal defect which defendant waived by failure to object to it in the trial court, and the record adequately establishes the correct date of the offense.
Defendant's second contention is that the trial court abused its discretion in sentencing him to the maximum term of three years' imprisonment on each of the four informations. Defendant argues that he never had a chance to participate in an inpatient program since he was rearrested before a space became available and that even the prosecutor agreed that defendant deserved another chance to participate in such a program.
In response, the State argues that the trial court is not bound by a prosecutor's sentencing recommendation. (People v. Makes (1981), 103 Ill. App.3d 232.) The State further contends that the trial court did not arbitrarily impose the three-year sentence in total disregard of defendant's situation. The State points out that at the sentencing hearing, it was disclosed that while defendant was on probation, he participated in an outpatient program involving methadone detoxification. The State concludes that because defendant's performance in an outpatient program was allegedly excellent, the trial court could infer that when defendant committed the theft he was not motivated by a drug craving. Under the facts of this case, we do not agree.
 3 The proper sentence to be imposed is a decision peculiarly within the province of the trial court. (People v. Perruquet (1977), 68 Ill.2d 149, 153-54.) The granting of treatment under the Act is within the discretion of the trial court and is not an option to be elected unilaterally by defendant. (People v. Robinson (1973), 12 Ill. App.3d 291, 294.) However, the court's discretion should be used with a view toward *174 implementing, rather than frustrating, the Act. Robinson, 12 Ill. App.3d at 295.
We begin by noting that the legislature is mindful of the need to address fully the wide-ranging ills that result from drug and alcohol addiction. The following language taken from the Alcohol and Substance Abuse Act is instructive.
"It is the public policy of this State that the human suffering and social and economic loss caused by the illness of * * * addiction to controlled substances * * * are matters of grave concern to the people of the State. * * * Key elements of a comprehensive and coordinated strategy should include * * * careful consideration of and attention to the special needs of minorities * * * the provision of a broad range of early intervention, treatment, and rehabilitation for * * * controlled substance addicts * * * that these unfortunate individuals may be restored to good health and again become useful citizens in the community." Ill. Rev. Stat. 1985, ch. 111 1/2, par. 6302.
See also People v. Robinson, 12 Ill. App.3d at 295.
 4 In the instant case, at the sentencing hearing after the revocation of probation, both the assistant State's Attorney and defense counsel recommended the defendant's placement in an inpatient treatment program at TASC. Although defendant had previously been ordered to participate in an inpatient TASC treatment program, his probation was revoked while he was still tenth on the waiting list for bed space. Until an opening was secured at TASC, it was further recommended that the defendant be held in the county jail:
"GIBSON [prosecutor]: The state would also be asking * * * six months * * * in the Lake County Jail, and in the alternative, * * * the state would have no objection to the defendant being shipped to that inpatient facility if it should come up before his six month term was done."
Defense counsel concurred, "I find myself * * * basically being in total agreement with the state's attorney's recommendation." The court rejected this compromise of treatment and punishment and sentenced defendant to concurrent three-year terms of incarceration.
At the hearing on the motion to reconsider the sentence, both counsel again recommended the TASC inpatient program, with detention until the program became available. Indeed, the prosecutor fully supported the defendant's motion:
"[I]t's fair to say the system failed the defendant in that, in the sense he didn't get inpatient which everyone agreed that is what he needs. He can't live without that inpatient work, and *175 the inpatient will probably lead on to a structured halfway house environment, and if he blows that then I would be the first person when he comes back before the Court, to ask for the maximum sentence on commission of another crime. I am in an unusual position for the state, in that I am not objecting to the defendant's motion to reconsider, and I think possibly the opportunity to get him off the streets and into an inpatient facility may be the way to go."
It is apparent that later in the course of these proceedings, the court failed to recognize the link between the defendant's drug use and his continuing pattern of thefts. At the hearing on the motion to reconsider, the following colloquy occurred between the public defender and the court:
"MS. PANTSIOS [Public Defender]: The defendant's progress in that outpatient program was excellent, he had no problems in that program in terms of cooperation with their rules and regulations. He was, it was never reported to this Court that he ever had any positive urinalysis results. Basically the problem that brought him back to the Court was the fact that, you know * * *.
THE COURT: He committed a theft.
MS. PANTSIOS: He committed a theft, and I guess the way I see it is that everybody I think agreed when he was initially placed on probation that what he needed was a residential program, and in using the outpatient program as a stop gap because we were all aware he needed some treatment, but he had to be off the streets to get away from the lifestyle that was leading him into drugs.
THE COURT: But the violation wasn't drugs, the violation was theft."
The court made these comments even though it had previously acknowledged that the defendant had "a heavy habit," which he had always supported by crime.
The court continued, "The penal system will certainly get him off of drugs, [since] it is in effect an inpatient treatment program."
In People v. Young (1979), 72 Ill. App.3d 592, 593, the court stated, "We do not believe that mere incarceration in a penal institution renders a person cured of drug addiction." We share this view. The prisons of our State are not intended to serve as drug rehabilitation facilities, nor do they typically serve such a function.
As noted above, while the court is given discretion in granting the treatment under the Act, this discretion should not be used to frustrate *176 the purposes of the Act. (Robinson, 12 Ill. App.3d at 295.) The instant case is not one in which defendant failed to complete his treatment or, having completed treatment, reverted to criminal behavior. Defendant never got the opportunity to participate in the inpatient program that the trial court initially prescribed for him. Defendant was still tenth on the waiting list for such a program when he was arrested. Karen Purves of TASC testified at the June 11, 1986, sentencing hearing that the outpatient program was only a "holding pattern" and that only the inpatient program would remove defendant from the type of environment which spawned and nurtured his addiction.
Further, both the State and defendant were in agreement that the only conceivable way to address adequately defendant's therapeutic needs was an inpatient program. The State even admitted that the system had let the defendant down.
Under these circumstances, we find that the court abused its discretion in not granting defendant inpatient treatment under the Act. Accordingly, we reverse the court sentence of three years' incarceration in the Department of Corrections and remand this case for further proceedings consistent with this opinion before a different trial judge.
Reversed and remanded.
NASH and REINHARD, JJ., concur.
