
779 N.E.2d 293 (2002)
334 Ill. App.3d 785
268 Ill.Dec. 679
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
Henry YOUNG, Defendant-Appellant.
No. 1-00-3525.
Appellate Court of Illinois, First District, First Division.
September 23, 2002.
Rehearing Denied November 1, 2002.
*294 Richard A. Devine, State's Attorney of Cook County, Chicago (Renee Goldfarb, Margaret J. Campos and Emily J. Grzanka, Assistant State's Attorneys, of counsel), for Plaintiff-Appellee.
Michael J. Pelletier, Deputy Defender, Chicago (Lori L. Mosby, Assistant Appellate Defender, of counsel), for Defendant-Appellant.
Justice COUSINS delivered the opinion of the court:
Defendant-appellant, Henry Young, appeals from a judgment revoking his probation and sentencing him to nine years' imprisonment. Defendant presents the following issues upon appeal: (1) whether the trial court's order revoking probation and imposing a 9-year sentence was void because he was not originally eligible for probation; (2) whether the mandatory Class X sentencing provision of section 5-5-3(c)(8) *295 of the Unified Code of Corrections (Code) (730 ILCS 5/5-5-3(c)(8) (West 1998)) violates the right of a defendant to due process and trial by jury because it subjects the defendant to increased punishment without notice or a jury finding upon proof beyond a reasonable doubt of the facts qualifying defendant for Class X sentencing; and (3) whether his case must be remanded so that he is credited with 546 days' sentence credit.

BACKGROUND
In August 1998, defendant was charged with aggravated possession of a stolen motor vehicle (APSMV) and possession of a stolen motor vehicle (PSMV). On April 9, 1999, defendant pled guilty to both counts. He was approved to participate in residential treatment with Treatment Alternatives for Safe Communities (TASC) and placed on three years' probation. The following colloquy occurred at that sentencing:
"THE COURT: State reluctantly gave up the right to a Pre Sentence Investigation and they are arguing that he can't get TASC by law.
MR. ROSENBLUM [Assistant State's Attorney]: If I can just put on the record
THE COURT: I just did it for that; that by law they believe he can't get TASC.
I am invoking judicial amity entrusted to me by state law in this case, all right?
That is your sentence. If you want to change your mind you have 30 days to do it. * * *
I recognize your drug addiction, but if you do not comply in any way with TASC
You're 53 years old. Do you understand that? You're 53 years old. I am taking into consideration your age, your drug addiction.
But if you don't comply with TASC in any way, shape or form, you will go to the penitentiary. It's your last
Basically your last chance. Take advantage of it."
On August 23, 1999, while on probation, defendant was arrested for PSMV. On October 1, 1999, the State filed a three-count petition for violation of probation and warrant alleging PSMV, failure to report to the adult probation department, and failure to comply with TASC rules. A hearing was held on the State's motion for violation of probation on June 12, 2000.
At that hearing, the vehicle owner and two investigative officers testified for the State. After the State's case, defendant made a motion for directed judgment on the charge of possession of a stolen motor vehicle, asserting that there was no testimony that defendant possessed a vehicle. Defendant asserted that there was no evidence that he committed a theft and no evidence that he knew the car was stolen. The motion was denied.
Defendant testified at the hearing. After the close of defendant's case, the parties stipulated that defendant had previously been convicted of APSMV on April 9, 1999. Further, they stipulated that defendant had been convicted of burglary on June 7, 1993.
The trial judge stated that he had considered the testimony of the van owner, the officers, and the defendant. The court held that the preponderance of the evidence showed that the defendant had possession of the van at one time after it had been stolen. Defendant's probation was revoked.
The defendant filed a motion for a new hearing. On July 21, 2000, defense counsel argued the motion. The motion was denied. At the sentencing, the State requested an extended-term sentence for the *296 defendant. Defendant was sentenced to nine years' imprisonment, with credit for 380 days in custody.

ANALYSIS

I
Defendant now asserts that because he was not eligible for probation in the first place, the subsequent order revoking probation and imposing a sentence of nine years' imprisonment was void and, therefore, must be reversed. The State initially responds that defendant has waived this issue for review by not raising it earlier. Alternatively, the State asserts the trial court did not err when it, using its discretion under the Alcoholism and Other Drug Abuse and Dependency Act (Treatment Alternatives Act) (20 ILCS 301/40-5 et seq. (West 1998)), sentenced defendant to TASC.
Before we begin our analysis, a review of the history of the Treatment Alternatives Act is warranted. In summary, the Treatment Alternatives Act (20 ILCS 301/40-5 et seq. (West 1998)) was preceded by the Dangerous Drug Abuse Act (Ill.Rev.Stat.1971, ch. 91 1/2, par. 120.1 et seq.) and the Alcoholism and Substance Abuse Act (Ill.Rev.Stat.1985, ch. 111 1/2, par. 6301 et seq.), which had very similar provisions.
The Dangerous Drug Abuse Act (Ill. Rev.Stat.1971, ch. 91 1/2, par. 120.1 et seq.) was created to provide treatment and rehabilitation to controlled substance abusers charged with a crime. Section 10 indicated that if the court determined that the individual was an addict and would likely be rehabilitated through treatment, the court could place him on probation and under the supervision of the Department of Corrections for treatment. Ill.Rev.Stat. 1977, ch. 91 1/2, par. 120.10.
On September 20, 1979, section 10 of the Dangerous Drug Abuse Act (Ill.Rev.Stat. 1979, ch. 91 1/2, par. 120.10) was amended by Public Act 81-851 (Pub. Act 81-851, § 1, eff. September 20, 1979), which allowed probation with treatment, if such sentence was consistent with section 5-6-1(a) of the Code (Ill.Rev.Stat.1979, ch. 38, par. 1005-6-1(a)).
Effective July 1, 1984, the Alcoholism and Substance Abuse Act (Ill.Rev.Stat. 1985, ch. 111 1/2, par. 6301 et seq.) was created to provide an alternative to criminal prosecution for persons that abused alcohol or drugs. On July 1,1988, the Alcoholism and Substance Abuse Act was repealed (Pub. Act 85-965, eff. July 1, 1988) and replaced by the Illinois Alcoholism and Other Drug Dependency Act (Ill.Rev.Stat. 1987, ch. 111 1/2, par. 6351 et seq.).
The Illinois Alcoholism and Other Drug Dependency Act was created to restore those persons charged with a crime that abuse or misuse alcohol or drugs to good health and become productive citizens. Ill. Rev.Stat.1987, ch. 111 1/2, par. 6351-2. The Illinois Alcoholism and Other Drug Dependency Act was later recodified (20 ILCS 305/1-101 et seq. (West 1992) (Pub. Act 87-895, art. 1, § 1-1, eff. July 14, 1992)). The Illinois Alcoholism and Other Drug Dependency Act was repealed by Public Act 88-80 (Pub. Act 88-80, § 95-5, eff. July 13, 1993). The new act was named the Alcoholism and Other Drug Abuse and Dependency Act (hereinafter, Treatment Alternatives Act) (20 ILCS 301/40-5 et seq. (West 1994)).
For purposes of the instant appeal, section 40-5 of the Treatment Alternatives Act provides:
"An addict or alcoholic who is charged with or convicted of a crime may elect treatment * * * referred to in this Article as `designated program', unless:
(1) the crime is a crime of violence;

*297 * * *
(3) the person has a record of 2 or more convictions of a crime of violence;
* * *
(7) the person has been convicted of residential burglary and has a record of one or more felony convictions." 20 ILCS 301/40-5(1), (3), (7) (West 1998).
Significantly, conviction of a Class 2 or greater felony within 10 years of the pending offense is not delineated as precluding treatment for an addict who requests treatment under the Treatment Alternatives Act if a court has reason to find the individual eligible and the individual is accepted for treatment in a designated program. See 20 ILCS 301/40-5 et seq. (West 1998). Section 40-10 of the Treatment Alternatives Act provides that the trial court may advise an individual that he or she may be placed on probation if he or she elects to submit to treatment and is accepted for treatment by a designated program, subject to the requirements under section 40-5 of the same act (20 ILCS 301/40-10 (West 1998)).
We now turn to the issue presented in the instant appeal by the defendant: whether the trial court's order revoking probation and imposing a 9-year sentence was void because defendant was not originally eligible for probation. Generally, a defendant who wishes to challenge his sentence or any irregularities in the sentencing hearing must first file a timely postsentencing motion in the trial court or the issue will be deemed waived. People v. Reed, 177 Ill.2d 389, 394, 226 Ill.Dec. 801, 686 N.E.2d 584 (1997). However, a sentence that does not conform to a statutory requirement is void and may be corrected at any time. People v. Arna, 168 Ill.2d 107, 113, 212 Ill.Dec. 963, 658 N.E.2d 445 (1995). A judgment is void where the court orders a lesser sentence than is mandated by statute. People v. Wade, 116 Ill.2d 1, 6, 107 Ill.Dec. 63, 506 N.E.2d 954 (1987).
Defendant in the instant case relies on People v. Simmons, 256 Ill.App.3d 651, 195 Ill.Dec. 295, 628 N.E.2d 759 (1993), to support his contention that because the court had no authority to place him on probation originally, his subsequent revocation of probation is also void. In Simmons, Lloyd Simmons was convicted of aggravated discharge of a firearm and unlawful use of a firearm by a felon. The trial court placed him on 30 months' probation, over the State's objection that he was ineligible for probation because he had prior Class 2 felony convictions. Simmons, 256 Ill. App.3d at 652, 195 Ill.Dec. 295, 628 N.E.2d 759. While on probation, Simmons was charged with possession of a stolen motor vehicle and burglary. The trial court found Simmons guilty of possession of a stolen motor vehicle and burglary and revoked probation. Simmons, 256 Ill.App.3d at 652, 195 Ill.Dec. 295, 628 N.E.2d 759. He was sentenced to 15 years' imprisonment for violating his probation and to a consecutive 7-year term for the other charges.
The issue before the appellate court was whether the original order placing defendant on probation was void. Simmons contended that the original order placing him on probation was void because he was ineligible for probation, the subsequent order revoking his probation was also void, and, consequently, his 15-year sentence must be vacated as void. The appellate court resolved: "Wade is dispositive of this issue." Simmons, 256 Ill.App.3d at 652, 195 Ill.Dec. 295, 628 N.E.2d 759. In Wade, the Illinois Supreme Court affirmed a trial court's holding that the order granting probation was void because the defendant had been previously convicted of armed robbery and rape, which made him ineligible *298 for probation. See Wade, 116 Ill.2d at 6-7, 107 Ill.Dec. 63, 506 N.E.2d 954.
The Simmons court noted that, as in Wade, the order placing defendant on probation was void because he was ineligible for probation due to his prior convictions. Simmons, 256 Ill.App.3d at 652-53, 195 Ill.Dec. 295, 628 N.E.2d 759. The Simmons court held that Lloyd Simmons was ineligible to be placed on probation for aggravated discharge of a firearm, a Class 1 felony conviction, because of his prior Class 2 convictions. Simmons, 256 Ill. App.3d at 652-53, 195 Ill.Dec. 295, 628 N.E.2d 759, citing Ill.Rev.Stat.1991, ch. 38, par. 1005-5-3(c)(2)(F). Section 5-5-3(c)(2)(F) provided that a period of probation shall not be imposed for a Class 2 or greater felony if the offender had been convicted of a Class 2 or greater felony within 10 years of the date on which he committed the offense for which he is being sentenced. Ill.Rev.Stat.1991, ch. 38, par. 1005-5-3(c) (2) (F). The Simmons court reasoned that the trial court lacked the inherent power to order a sentence less than that mandated by statute and, consequently, vacated the original order placing Simmons on probation. Simmons, 256 Ill.App.3d at 653, 195 Ill.Dec. 295, 628 N.E.2d 759. The Simmons court further held that because the underlying order of probation was void, the subsequent order revoking defendant's probation and the 15-year sentence imposed upon the revocation were also void. Simmons, 256 Ill. App.3d at 653, 195 Ill.Dec. 295, 628 N.E.2d 759. The case was then remanded for resentencing on defendant's original convictions of aggravated discharge of a firearm and unlawful use of a firearm by a felon. Simmons, 256 Ill.App.3d at 653, 195 Ill.Dec. 295, 628 N.E.2d 759. In Simmons, unlike the instant case, the defendant was not placed on treatment-based probation.
The State asserts that defendant's reliance on Simmons and the Code is misplaced because the defendant in Simmons was sentenced under a separate statute and the defendant here was found eligible for treatment based on his drug addiction and the trial court's discretion. The State cites People v. York, 87 Ill.App.3d 1026, 42 Ill.Dec. 910, 409 N.E.2d 525 (1980), to support its contention that the defendant fails to recognize that the trial court had the authority to deviate from regular sentencing procedures based upon defendant's drug addiction.
In York, defendant Gary York appealed following the revocation of probation previously imposed after he pled guilty to unlawful delivery of a controlled substance. One of the issues presented on appeal was whether the trial court erred by failing to consider drug treatment as an alternative to sentencing pursuant to the Dangerous Drug Abuse Act (Ill.Rev.Stat.1979, ch. 91 1/2, par. 120.1 et seq.). York, 87 Ill.App.3d at 1027, 42 Ill.Dec. 910, 409 N.E.2d 525. The appellate court observed that pursuant to the Dangerous Drug Abuse Act, persons convicted of a crime, in the discretion of the trial court, may be given the opportunity to elect to be treated instead of being sentenced to probation if the trial court had reason to believe the defendant was an addict or he stated he was an addict and he meets the eligibility requirements. York, 87 Ill.App.3d at 1030, 42 Ill.Dec. 910, 409 N.E.2d 525, citing People v. Warren, 69 Ill.2d 620, 14 Ill.Dec. 879, 373 N.E.2d 10 (1977). The York court affirmed that a trial court has a duty to consider this alternative to the usual sentencing procedure if the defendant is eligible even if the offense for which the defendant stands convicted of is not probationable. York, 87 Ill.App.3d at 1030, 42 Ill.Dec. 910, 409 N.E.2d 525, citing People v. Teschner, 81 Ill.2d 187, 407 N.E.2d 49, 40 Ill.Dec. 818, (1980).
*299 Although the Treatment Alternatives Act in the instant case is not identical to the previous Dangerous Drug Abuse Act, in our view, an instructive case is People v. Teschner, 81 Ill.2d 187, 40 Ill.Dec. 818, 407 N.E.2d 49 (1980). In Teschner, the defendant, John Slowinski, had been convicted of two counts of burglary in November 1974 and placed on probation. In June 1977, he had been sentenced to two years' probation for another burglary, conditioned upon his receiving treatment through a drug rehabilitation program. In September 1978, Slowinski was charged with a July 1978 burglary. Before the trial for the July 1978 burglary commenced, the defendant petitioned the court to be treated as an narcotic addict under the Dangerous Drug Abuse Act (Ill.Rev. Stat.1977, ch. 91 1/2, par. 120.1 et seq.) and be placed under the supervision of the Department of Mental Health for treatment. The judge ordered an examination of Slowinski to determine whether he was an addict and likely to be rehabilitated through treatment. After receiving the examination report, the judge found Slowinski guilty of burglary and sentenced him to 36 months' probation, conditioned upon completion of the rehabilitation program. Teschner, 81 Ill.2d at 190, 40 Ill.Dec. 818, 407 N.E.2d 49.
On appeal, the petitioner, the State, contended that circuit court judge John Teschner was precluded from placing the defendant into a drug rehabilitation program pursuant to the Dangerous Drug Abuse Act because of the provision in the Unified Code of Corrections (Ill.Rev.Stat.1977, ch. 38, par. 1005-5-3) stating that a defendant may not be sentenced to probation upon his conviction for a Class 2 felony or greater within 10 years. Teschner, 81 Ill.2d at 190-91, 40 Ill.Dec. 818, 407 N.E.2d 49. The Illinois Supreme Court disagreed.
In its ruling, the Illinois Supreme Court observed that the election to treatment under the Dangerous Drug Abuse Act was not a sentence but, rather, was an alternative to the sentencing procedure. Teschner, 81 Ill.2d at 192, 40 Ill.Dec. 818, 407 N.E.2d 49. The court wrote: "It is apparent that the legislature felt that the treatment for drug abuse requires more medical and social treatment than can be provided under the present criminal justice system through a sentence of probation with conditions imposed concerning treatment of the drug problem." Teschner, 81 Ill.2d at 192, 40 Ill.Dec. 818, 407 N.E.2d 49. The Illinois Supreme Court held: "[t]he provisions of the Unified Code of Corrections are not controlling in this case and should not be superimposed upon the provisions of the Dangerous Drug Abuse Act to prohibit a disposition of probation authorized under that act." Teschner, 81 Ill.2d at 193, 40 Ill.Dec. 818, 407 N.E.2d 49.
In Teschner, the court also noted that subsequent to the sentencing of the defendant, the Dangerous Drug Abuse Act was amended to specify that a court may place a person on probation for treatment, as provided under the Act, "if such a sentence is consistent with Section 5-6-1(a) of the Unified Code of Corrections." (Ill.Rev. Stat.1979, ch. 91 1/2, par. 120.10). Teschner, 81 Ill.2d at 194, 40 Ill.Dec. 818, 407 N.E.2d 49. The court stated that because the amendment was not effective at the time of sentencing, it was not controlling. We note that at the time of sentencing in Teschner, the Dangerous Drug Abuse Act did not limit the circuit court's discretion to being consistent with the Unified Code of Corrections.
Similarly, in the instant case, at the time of the offense, the Treatment Alternatives Act did not limit the circuit court's discretion to being consistent with the Unified Code of Corrections. The Treatment Alternatives Act provided that if the court *300 had reason to believe that an individual who is charged with or convicted of a crime suffers from alcoholism or other drug addiction and the court finds that he is eligible to make the election for treatment provided in section 40-5, the court shall advise him that he may be placed on probation. 20 ILCS 301/40-5 (West 1998).
Subsequent to defendant's sentencing here, the pertinent section of the Treatment Alternatives Act indicated that if the court had reason to believe that an individual who is charged with or convicted of a crime suffers from alcoholism or other drug addiction and the court finds that he is eligible to make the election for treatment provided in section 40-5, the court shall advise the individual that he or she may be sentenced to probation and "shall be subject to terms and conditions of probation under Section 5-6-3 of the Unified Code of Corrections if he or she elects to submit to treatment and is accepted for treatment." 20 ILCS 301/40-10 (West 2000). Section 5-5-3(c)(2)(F) of the Unified Code of Corrections was also amended and excepts sentences imposed under section 40-10 of the Treatment Alternatives Act. 730 ILCS 5/5-5-3 (West 2000). However, because the amendments to both statutes are subsequent to the date of sentencing in the instant case, they are not applicable to this appeal.
For the foregoing reasons, we hold that the trial court in the instant case did not err in using its discretion to sentence defendant to TASC probation.

II
Defendant, while relying on Apprendi v. New Jersey, 530 U.S. 466, 120 S.Ct. 2348, 147 L.Ed.2d 435 (2000), also asserts that the Class X sentencing provision of section 5-5-3(c)(8) violates the right of a defendant to due process and trial by jury because it subjects a defendant to increased punishment without notice or a jury finding upon proof beyond a reasonable doubt of the facts qualifying defendant for sentencing as a Class X offender. The State responds that Apprendi does not apply to recidivist provisions such as section 5-5-3(c)(8).
The appellate court has addressed and rejected defendant's contention in various cases. See People v. Lathon, 317 Ill. App.3d 573, 251 Ill.Dec. 296, 740 N.E.2d 377 (2000). (section 5-5-3(c)(8) is constitutional under Apprendi); People v. Ramos, 318 Ill.App.3d 181, 252 Ill.Dec. 225, 742 N.E.2d 763 (2000) (Apprendi clearly exempts recidivist statutes); People v. Roberts, 318 Ill.App.3d 719, 729, 743 N.E.2d 1025, 252 Ill.Dec. 869 (2000) (rejected defendant's assertion that Apprendi renders recidivist provisions unconstitutional); People v. Echols, 325 Ill.App.3d 515, 517, 259 Ill.Dec. 470, 758 N.E.2d 878 (2001) (agreed with reasoning in Lathon); People v. Dunn, 326 Ill.App.3d 281, 289, 260 Ill. Dec. 94, 760 N.E.2d 511 (2001) (section 5-5-3(c)(8) is constitutional under Apprendi).
In Lathon, John Lathon was convicted of attempted residential burglary and received the mandatory sentencing enhancement based on prior felony convictions pursuant to section 5-5-3(c)(8). Lathon asserted that the section was unconstitutional under Apprendi because it violated the United States Supreme Court's mandate that "`any fact (other than prior conviction) that increases the maximum penalty for a crime must be charged in an indictment, submitted to a jury, and proven beyond a reasonable doubt.'" (Apprendi, 530 U.S. at 476, 120 S.Ct. at 2355, 147 L.Ed.2d at 446, quoting Jones v. United States, 526 U.S. 227, 243 n.6, 119 S.Ct. 1215, 1224 n. 6, 143 L.Ed.2d 311, 326 n. 6 (1999)). The Lathon court rejected defendant's assertion and held that "the mandatory Class X sentencing provision of section 5-5-3(c)(8), which provides for sentencing enhancement based on prior *301 convictions, is constitutional and does not violate defendant's due process rights or jury trial guarantees." Lathon, 317 Ill. App.3d at 587, 251 Ill.Dec. 296, 740 N.E.2d 377. The court noted that a defendant's recidivism is a narrow exception to the general rule articulated in Apprendi Lathon, 317 Ill.App.3d at 587, 251 Ill.Dec. 296, 740 N.E.2d 377. Moreover, the defendant's prior convictions were not an essential element of the underlying criminal offense and the prior convictions did not relate to the commission of the underlying offense. Lathon, 317 Ill. App.3d at 587, 251 Ill.Dec. 296, 740 N.E.2d 377. The court reasoned that a defendant's sentence is properly increased when the trial judge concludes that the evidence of the prior two convictions is accurate, reliable and satisfies the section 5-5-3(c)(8) statutory factors. Lathon, 317 Ill.App.3d at 587, 251 Ill.Dec. 296, 740 N.E.2d 377. For those reasons, the Lathon court held that when a defendant's punishment is increased based on prior convictions, the prior convictions need not be alleged in the charging document, submitted to the jury or proven beyond a reasonable doubt. Lathon, 317 Ill.App.3d at 587, 251 Ill.Dec. 296, 740 N.E.2d 377.
We find the reasoning in Lathon and to be sound and elect to follow it here. We hold that Apprendi does not render the Class X offender sentencing provision found in section 5-5-3(c)(8) unconstitutional.

III
Defendant also contends that his case must be remanded so that he is credited with 546 days' toward his 9-year sentence. The State responds that he should be given 532 days' credit, not 546. In his reply brief, defendant concedes that the State's figure of 532 days is accurate.
A defendant shall be given credit on the determinate sentence for time spent in custody as a result of the offense for which the sentences is imposed. 730 ILCS 5/5-8-7(b) (West 1998). In the instant case, defendant was taken into custody on September 24, 1998, and released on April 9, 1999. The amount of time between those dates equaled 198 days. Defendant was taken into custody for a violation of probation on August 24, 1999, and was in custody until his sentencing on July 21, 2000. The amount of time between those dates equaled 334 days. The appropriate number of days' credit that the defendant is due amounts to 532 days.
Citing Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984), defendant also asserts that his trial counsel's representation should be deemed deficient because he miscalculated the number of pretrial incarceration days. We disagree. Defendant has not demonstrated any prejudice to him based on the miscalculation. If no prejudice to the defendant is established, then there is no need to determine separately whether counsel's performance was deficient. People v. Albanese, 104 Ill.2d 504, 527, 85 Ill.Dec. 441, 473 N.E.2d 1246 (1984).
For the foregoing reasons, we affirm the trial court's revocation of defendant's probation and the imposition of nine years' imprisonment. We also remand this matter to the trial court to correct the sentencing order to reflect the 532 days' credit due to the defendant. The State's request for fees in the sum of $100 for defending this appeal is granted, pursuant to section 4-2002.1 of the Counties Code (55 ILCS 5/4-2002.1 (West 1992)).
Affirmed and remanded with directions.
GORDON, P.J., and McNULTY, J., concur.
