
89 Ill.2d 469 (1982)
433 N.E.2d 674
THE PEOPLE OF THE STATE OF ILLINOIS, Appellee,
v.
BURNELL ROBINSON et al. (Burnell Robinson, Appellant).
No. 54603.
Supreme Court of Illinois.
Opinion filed March 16, 1982.
*470 Robert Agostinelli, Deputy Defender, of the Office of the State Appellate Defender, of Ottawa, for appellant.
Tyrone C. Fahner, Attorney General, of Springfield, and Edward F. Petka, State's Attorney, of Joliet (John X. Breslin and Gerry R. Arnold, of the State's Attorneys Appellate Service Commission, of Ottawa, of counsel), for the people.
Judgment affirmed.
*471 JUSTICE CLARK delivered the opinion of the court:
Burnell Robinson appeals the imposition of a sentence of 12 years for robbery, pursuant to the extended-term provisions of the Unified Code of Corrections, sections 5-8-2 and 5-5-3.2(b)(1) (Ill. Rev. Stat. 1979, ch. 38, pars. 1005-8-2, 1005-5-3.2(b)(1)). For the reasons stated below, we affirm.
Robinson and a codefendant, Mack Bell, were jointly indicted in the circuit court of Will County for one count each of robbery and one count each of aggravated battery. On May 16, 1979, a jury found both defendants guilty on all counts. On August 8, 1979, the circuit court sentenced Robinson to an extended term of 12 years' imprisonment for robbery and a term of 5 years for aggravated battery, the sentences to run concurrently. Bell had previously been sentenced, in a separate proceeding, to concurrent terms of three years for robbery and two years for aggravated battery.
The appellate court, in a split decision, affirmed the imposition of the extended term on Robinson. (91 Ill. App.3d 1128.) Bell did not appeal his sentence, nor is he involved in the appeal to this court. The appellate court also, on the authority of People v. Cook (1980), 81 Ill.2d 176, vacated the circuit court's order that the public defender be reimbursed from the defendants' bail deposits.
At Robinson's sentencing hearing, the State introduced certified copies of four previous convictions. These were as follows:


   January 17, 1958   Armed robbery, Will County, paroled April 17, 1959;
   February 8, 1967   Robbery, Kane County, sentenced to six years,
                       paroled April 11, 1969;
   April 20, 1967     Robbery, United States District Court, Northern
                       District of Illinois, sentenced to 25 years, paroled
                       December 1974;
   June 12, 1967      Robbery, Will County, sentenced to two to eight
                       years, paroled April 9, 1969.

*472 The 1958 conviction was introduced solely for the purpose of aggravation and not for the purpose of triggering the application of the extended-term provision.
The circuit court found that section 5-5-3.2(b)(1) was applicable to Robinson. That section provides:
"(b) The following factors may be considered by the court as reasons to impose an extended term sentence under Section 5-8-2 upon any offender who was at least 17 years old on the date the crime was committed:
(1) When a defendant is convicted of any felony, after having been previously convicted in Illinois of the same or greater class felony, within 10 years, excluding time spent in custody, and such charges are separately brought and tried and arise out of different series of acts * * *." Ill. Rev. Stat. 1979, ch. 38, par. 1005-5-3.2(b)(1).
Section 5-5-3.2 was added to the Unified Code of Corrections by Public Act 80-1099, effective February 1, 1978. As the appellate court recognized, the question of the operation of the 10-year limitations period on the use of prior convictions as the basis for imposing an extended term is one of first impression.
Prior to the enactment of section 5-5-3.2, an extended term could be imposed only on offenders convicted of a felony in which either serious bodily harm was inflicted or threatened, or a firearm was used. (Ill. Rev. Stat. 1973, ch. 38, par. 1005-8-2.) The offender's prior criminal record could be considered in aggravation of the sentence to be imposed (Ill. Ann. Stat., ch. 38, par. 1005-8-1, Council Commentary, at 481-82 (Smith-Hurd 1973)), but was not a statutory basis for imposing an extended term.
The 1978 amendment appears to have both broadened and narrowed the applicability of the extended term. As a result of the amendment, the extended term is now applicable to a larger number of felonies. Amended section 5-8-2 now specifies the maximum and minimum extended *473 sentence for each class of felony, while the criteria for imposing the extended term were transferred to new section 5-5-3.2(b).
Section 5-5-3.2(b)(2) provides that an extended term may be imposed when the felony for which the offender is sentenced "was accompanied by exceptionally brutal or heinous behavior indicative of wanton cruelty." This replaces the previous provision which applied to felonies committed with a firearm or accompanied by serious injury. In addition, under section 5-5-3.2(b)(1) the extended term may now be imposed on repeat offenders on the basis of a prior felony conviction. However, the statute does limit the use of prior convictions in two ways: only a prior conviction for a felony of the same or greater class as the current offense triggers the application of the extended term; and the only felony convictions that may be considered are those that occurred within 10 years, "excluding time spent in custody," of the conviction for which the offender is being sentenced.
With this background, we turn to the case at hand. The appellate court framed the issues as (1) whether a prior Federal conviction, entered by a Federal court sitting in Illinois, may be the basis for imposing an extended-term sentence; and (2) whether time spent in Federal custody is to be excluded when calculating the 10-year limitations period.
The appellate court thought that the phrase "excluding time spent in custody" was modified by "after having been previously convicted in Illinois of the same or greater class felony," and hence that "time spent in custody" should be interpreted to mean time spent in custody as the result of the prior conviction. Therefore, it reasoned, the time Burnell Robinson spent in custody for his Federal offense (some five years and three months) could not properly be excluded from the computation of the 10-year limitations *474 period unless the 1967 Federal conviction was a conviction "in Illinois" upon which the imposition of an extended term could properly be based. (Excluding the approximately five years Robinson spent in Federal custody between 1967 and 1979, his current (1979) conviction occurred within seven years of the 1967 Federal conviction. In other words, of this 12-year period only seven years were not spent in custody and only those seven years would be counted in calculating whether the 10-year limitations period had run.) The appellate court concluded, however, that the phrase "previously convicted in Illinois" applied to Robinson's Federal conviction for a Federal offense, since it had been entered by a court sitting within the geographic boundaries of Illinois, the Federal District Court for the Northern District of Illinois.
Robinson contends that the appellate court improperly held that his Federal felony conviction could serve as the basis for imposing an extended sentence. He offers two arguments in support of the view that the General Assembly intended the extended-term provision to apply only when the prior conviction was a conviction entered in an Illinois court, for a violation of Illinois law. First, he argues that the absence of an explicit reference to Federal convictions in section 5-5-3.2(b)(1) means that the legislature did not intend the provision to apply to them. He points out that other sections of the Criminal Code of 1961 and the Unified Code of Corrections do explicitly include Federal convictions, notably the habitual criminal statute (Ill. Rev. Stat., 1980 Supp., ch. 38, par. 33B-1(a)) and the section specifying the aggravating factors that may trigger imposition of the death penalty (Ill. Rev. Stat. 1979, ch. 38, par. 9-1(b)(3)). Moreover, Robinson argues, since section 5-5-3.2(b)(1) specifically refers to prior convictions for "the same or greater class felony," it must mean felonies classified by the Illinois legislature. *475 Federal felonies, Robinson points out, are not divided into classes, and the statute does not provide a means of determining which Federal offenses are "of the same or greater class" as the offense for which the defendant is being sentenced. Robinson concludes that the statute is at least ambiguous as to whether a prior Federal conviction can properly serve as the basis for an extended term, and that since it is a penal statute it should be read narrowly to exclude them.
We agree with Robinson that the extended-term provision, since it is a penal statute, should be strictly construed. (People v. Perkins (1946), 395 Ill. 553, 559.) However, while conceding that section 5-5-3.2(b)(1) may be ambiguous with respect to its applicability in the case of a prior Federal conviction, we need not consider Robinson's contentions further, since we decide the case on a different basis. In our view, the unambiguous language of the statute requires us to hold that Robinson's 1967 Illinois convictions for robbery may be considered for the purpose of imposing an extended term, since the time Robinson spent in Federal custody must be excluded from the 10-year period, and the 1967 convictions thus occurred "within 10 years, excluding time spent in custody," of his current conviction. This was the reasoning upon which the circuit court found the extended-term provision to be applicable, and we conclude that it was correct.
It is a primary rule of statutory construction that the intention of the legislature should be ascertained and given effect. In so doing, courts look first to the terms of the statute. (People v. Haron (1981), 85 Ill.2d 261, 266; Western National Bank v. Village of Kildeer (1960), 19 Ill.2d 342, 350.) The statutory language itself is the best indication of the intent of the drafters (Coryn v. City of Moline (1978), 71 Ill.2d 194, 200), and where that intent can be ascertained from the language of the statute, it *476 will be given effect without resorting to other aids for construction. People v. Haron (1981), 85 Ill.2d 261, 266-67; People ex rel. Gibson v. Cannon (1976), 65 Ill.2d 366, 369.
Section 5-5-3.2(b)(1) states that an extended term may be imposed "[w]hen a defendant is convicted of any felony, after having been previously convicted in Illinois of the same or greater class felony, within 10 years, excluding time spent in custody * * *." The clear implication is that "time spent in custody" is not to be counted in determining whether 10 years have elapsed since the offender's prior conviction. Although the statute does say that the defendant must have been previously convicted "in Illinois," it does not say "excluding time spent in custody as the result of an Illinois conviction," and we see no reason to qualify it in this way. We conclude that "time spent in custody" means time spent in any custody as the result of a conviction of a Federal crime or violation of another State's criminal statute.
This conclusion is reinforced by a consideration of the purpose of the extended-term provision. The aim of recidivist statutes is to impose harsher sentences on offenders whose repeated convictions have shown their resistance to correction. (ALI Model Penal Code sec. 7.03, comments 1 and 2, at 38-41 (Tent. Draft No. 2, 1954).) Realistically, one can assess an offender's tendency to recidivism only when, having served his sentence, he has returned to society; his behavior while in custody can hardly be viewed as a reliable indicator of the likelihood of his committing another offense when released. Thus, though the General Assembly chose to create a "statute of limitations" for the use of prior convictions to extend the sentence of a repeat offender, the limitation is itself limited, so that the incorrigible recidivist will remain subject to the extended term.
The appellate court held that, for the purpose of *477 determining the 10-year period, the date of a conviction is the date of entry of the sentencing order. Neither party to the appeal disagrees with this holding, and we find it consistent both with the statute and with this court's decisions concerning the date of conviction for purposes of appeal. People v. Allen (1978), 71 Ill.2d 378.
For the foregoing reasons, the judgment of the appellate court is affirmed.
Judgment affirmed.
