
158 P.3d 1014 (2007)
2007-NMCA-059
STATE of New Mexico, Plaintiff-Appellant,
v.
Julio TAVE, Defendant-Appellee.
No. 25,906.
Court of Appeals of New Mexico.
March 27, 2007.
Certiorari Denied May 11, 2007.
Gary K. King, Attorney General, Santa Fe, NM, Joel Jacobsen, Assistant Attorney General, Albuquerque, NM, for Appellant.
Robert E. Tangora, L.L.C., Robert E. Tangora, Santa Fe, NM, for Appellee.
Certiorari Denied, No. 30,352, May 11, 2007.

OPINION
FRY, Judge.
{1} The State appeals the trial court's sentence of Defendant Julio Tave on the basis that the trial court incorrectly interpreted and applied the habitual offender statute, NMSA 1978, § 31-18-17 (2003). As a statutory sentence enhancement scheme for repeat offenders, the statute prohibits the use of prior convictions whose sentence, parole, or probation completion dates are more than ten years old. In this case, the trial court refused to enhance Defendant's sentence because it calculated the ten-year period from the date that it re-sentenced Defendant after Defendant successfully appealed his original sentence. The State argues that the proper date from which the ten-year period should be calculated is the date of conviction. We disagree with the trial court's interpretation of the statute that the date of re-sentencing controls. We therefore reverse and remand for re-sentencing.
BACKGROUND
{2} The habitual offender statute provides mandatory sentence enhancements for convicted felons with prior felony convictions from up to ten years before the underlying conviction. § 31-18-17. Subsections A through C of the statute, respectively, outline sentence enhancements for convicted felons with one, two, and three or more applicable prior convictions. Id. (A)-(C). One applicable prior felony conviction increases the sentence by one year, two prior convictions increase the sentence by four years, and three or more prior convictions increase the sentence by eight years. Id. Section 31-18-17(D)(1) defines "prior felony conviction" as "a conviction, when less than ten years have passed prior to the instant felony conviction *1015 since the person completed serving his sentence or period of probation or parole for the prior felony, whichever is later, for a prior felony committed within New Mexico."
{3} Our opinion in State v. Shay, 2004-NMCA-077, 136 N.M. 8, 94 P.3d 8, is significant to an understanding of the proceedings in the trial court. In Shay, this Court interpreted the 2002 amendment to the habitual offender statute. Id. The 2002 amendment allowed sentence enhancement only if the defendant's prior felony convictions had occurred within the past ten years. NMSA 1978, § 31-18-17 (2002). Prior to that amendment, the habitual offender statute required enhancement of a defendant's sentence based on any prior felony conviction, regardless of how much time had passed since the prior conviction. NMSA 1978, § 31-18-17 (1993). Both the defendants in the consolidated cases addressed in Shay were convicted of felonies, and, prior to sentencing on the convictions, but after the date that the 2002 amendment went into effect, the State filed supplemental criminal informations charging the defendants as habitual offenders. Shay, 2004-NMCA-077, ¶¶ 3, 4, 136 N.M. 8, 94 P.3d 8. The trial courts sentenced both defendants without considering the 2002 amendment; that is, the trial courts considered all of the defendants' prior felony convictions, without regard to the ten-year limitation period. In Shay, this Court reversed both of the defendants' sentences, holding that the 2002 amendment applies when the state files a supplemental information charging habitual offender status after the effective date of the amendment, which was July 1, 2002. Id. ¶ 23.
{4} The facts in this case are undisputed. Defendant was arrested in August 2002 based on four felony indictments. The trial court severed the charge of aggravated battery causing great bodily harm from the other three counts, which were based on shooting at or from a motor vehicle and wrongful possession of a firearm. At trial on the three counts involving the firearm in November 2002, the jury convicted Defendant of one count of possession of a firearm by a felon and found him not guilty of the other two charges. On January 27, 2003, the State filed a supplemental criminal information charging Defendant under the habitual offender statute based on three prior felony convictions. The following day, Defendant pleaded no contest to the aggravated battery charge and admitted that he had been convicted of the three prior felonies in exchange for the State's agreement that Defendant's sentences for aggravated battery and possession of a firearm could run concurrently. The effective dates of Defendant's prior convictions are May 24, 1989, November 30, 1990, and June 26, 1996.
{5} Defendant was sentenced on May 19, 2003, and the trial court did not apply the ten-year period of limitations to Defendant's prior felony convictions as prescribed by the 2002 amendments. The trial court sentenced Defendant to three years for the aggravated battery, enhanced by eight years based on the three prior convictions, for a total of eleven years. The trial court also sentenced Defendant to one and a half years for possession of a firearm by a felon, also enhanced by eight years for his priors, but that sentence was to run concurrently with the sentence on the aggravated battery. Defendant appealed his sentence, making the same arguments the defendants raised in Shay. In an unpublished memorandum opinion, this Court reversed Defendant's original sentence based on Shay. See State v. Tave, No. 24,114, slip op. (N.M. Ct.App. filed May 27, 2004). Our Supreme Court granted certiorari on the initial appeal in this case and in Shay, but after it quashed certiorari in Shay, it also quashed certiorari in this case and returned it to the trial court for re-sentencing.
{6} The trial court re-sentenced Defendant on April 25, 2005, pursuant to our memorandum opinion's instructions to apply the 2002 amendment. At the second sentencing hearing, Defendant and the State agreed that the first prior conviction, from May 24, 1989, could not be used as an enhancement because it was beyond the ten-year period. The parties also agreed that the third prior conviction, from June 26, 1996, could be used to enhance Defendant's sentence because it was within the ten-year period. With respect to the second prior conviction, the parties agreed that Defendant finished his parole *1016 on July 4, 1993, but they disputed whether the second prior conviction could be used as an enhancement. Defendant argued that the date of re-sentencing, April 25, 2005, should be used to calculate the ten-year period from which prior convictions could be used to enhance his sentence under the statute; thus, if his argument was accepted, he would be sentenced as a one-time habitual offender. The State argued that the date of the original sentencing, May 19, 2003, should be used to calculate the ten-year period for prior conviction enhancements.
{7} The trial court held that the date of re-sentencing was the proper date from which to calculate the ten-year period for sentence enhancements and sentenced Defendant as a one-time habitual offender. The trial court interpreted Shay to mean that "the date the sentence was imposed is the date that we count from. . . . I guess that makes today sentencing day. . . . I am convinced that [Defendant's] argument is correct, [and] that leaves us with one prior, so a sentence of four years." The State appeals Defendant's sentence, arguing that the controlling date for calculating the ten-year period is the date of Defendant's conviction for the crimes at issue in this case.
DISCUSSION
The State Is Entitled to Raise the Illegality of Defendant's Sentence for the First Time on Appeal
{8} Defendant argues that the State failed to preserve its argument for appeal. We do not agree. The issue of whether Defendant's sentence is illegal is jurisdictional in nature and can be raised for the first time on appeal. Our decision in Shay speaks directly to this point.
This Court . . . has allowed both the state and defendants to challenge illegal sentences for the first time on appeal. This result is based on the rationale that the district court does not have jurisdiction to impose an illegal sentence and the appellate rules allow jurisdictional issues to be raised for the first time on appeal.
2004-NMCA-077, ¶ 6, 136 N.M. 8, 94 P.3d 8 (citation omitted); see also State v. Martinez, 1998-NMSC-023, ¶ 12, 126 N.M. 39, 966 P.2d 747 ("A trial court's power to sentence is derived exclusively from statute. This limitation on judicial authority reflects the separation of powers notion that it is solely within the province of the Legislature to establish penalties for criminal behavior." (internal quotation marks and citations omitted)).
{9} Defendant argues, based on State v. Wilson, 2001-NMCA-032, 130 N.M. 319, 24 P.3d 351, that this exception to the preservation rules does not apply. Id. ¶ 30. In Wilson, we "clarif[ied] that not all sentencing issues may be raised for the first time on appeal." Id. The defendant in Wilson objected to the trial court's use of the defendant's "lack of remorse" and "initial and continued deception" as aggravating factors to increase the defendant's sentence. Id. (internal quotation marks omitted). The defendant in Wilson did not challenge the trial court's use of the aggravating factors at the time of sentencing. Id. This Court noted that the formal preservation requirements have the purposes of "insur[ing] that the record is adequate for meaningful review and giv[ing] the trial court an opportunity to correct any alleged errors." Id. ¶ 32. We held that the defendant had to preserve her arguments because in that case, had the defendant argued that the use of such criteria was improper, the trial court would have had the opportunity to explain its reasoning and the weight it gave to each factor. Id. We said that the opportunity for a trial court to explain itself would prevent this Court from "hav[ing] to guess at what was and what was not an issue." Id. (alteration in original) (internal quotation marks and citation omitted).
{10} Although Wilson and the present case both deal with sentencing enhancements, the rule in Wilson limiting the exception to the preservation requirement is inapplicable here. Unlike Wilson, where the trial court exercised its discretion to balance factual considerations in determining the defendant's sentence, this case involves a question that is purely legal in nature  the interpretation of a statute. Because this case presents a question of law, the adequate development of the record is irrelevant, especially because the parties stipulate to all of the relevant *1017 facts. We therefore turn to the merits of the State's argument.
The Controlling Date for Determining the Applicable Ten-Year Period for the Habitual Offender Statute Is the Date of the Present Conviction
{11} When applying the habitual offender statute, the question is which date or event triggers the ten-year time limit on the use of prior convictions as enhancements. Interpreting a statute is a question of law that this Court reviews de novo. State v. Dawson, 1999-NMCA-072, ¶ 8, 127 N.M. 472, 983 P.2d 421. "Our ultimate goal in statutory interpretation is to find and give effect to the intent of the legislature by looking to the plain meaning of the language used in the statute." State v. Padilla, 2006-NMCA-107, ¶ 11, 140 N.M. 333, 142 P.3d 921, cert. granted, 2006-NMCERT-008, 140 N.M. 424, 143 P.3d 186. According to the plain meaning rule, "[w]hen a statute contains language which is clear and unambiguous, we must give effect to that language and refrain from further statutory interpretation." State v. Martinez, 2005-NMCA-052, ¶ 9, 137 N.M. 432, 112 P.3d 293 (internal quotation marks and citation omitted).
{12} The habitual offender statute provides in pertinent part:
D. As used in this section, "prior felony conviction" means:
(1) a conviction, when less than ten years have passed prior to the instant felony conviction since the person completed serving his sentence or period of probation or parole for the prior felony, whichever is later, for a prior felony committed within New Mexico whether within the Criminal Code or not, but not including a conviction for a felony pursuant to the provisions of Section 66-8-102 NMSA 1978[.]
§ 31-18-17(D)(1). The plain language in Subsection D answers the question raised in this appeal. It defines a "prior felony conviction" as "a conviction, when less than ten years have passed prior to the instant felony conviction." Id. (emphasis added). Thus, the sentencing judge should look back ten years from the date of the current conviction to determine whether Defendant has any prior felony convictions for purposes of the enhancement. This interpretation is supported by the fact that the statute makes no references to the date of sentencing, or, in a case like this, where Defendant successfully challenged the original sentence on appeal, to the date of re-sentencing. The statute contemplates that the sentencing judge will consider any prior felony convictions within ten years prior to the date of the conviction for which a sentence is being imposed.
{13} Defendant makes two arguments against this position. First, Defendant argues that Shay supports his position that the operative date for determining the ten-year period is the date of re-sentencing. Defendant urges us to read Shay in conjunction with NMSA 1978, § 12-2A-16(C) (1997), which limits the effect of a statutory amendment reducing a criminal penalty. Defendant's reliance on Shay is misplaced. Shay and its discussion of Section 12-2A-16(C) speak to the question of which enhancement statute applies  either the pre-2002 statute or the post-2002 amended statute. Neither Shay nor Section 12-2A-16(C) addresses the date from which the ten-year period should be calculated.
{14} Next, Defendant relies on State v. Lucero, 2006-NMCA-114, 140 N.M. 327, 142 P.3d 915, cert. granted, 2006-NMCERT-008, 140 N.M. 423, 143 P.3d 185, to support its argument that the trial court correctly applied the habitual offender statute in sentencing Defendant. We are not persuaded. In Lucero, this Court confronted the question of which sentencing enhancement applied in a case where one applicable statutory enhancement was in effect at the time the defendant allegedly committed a crime and was charged with the crime, and the enhancement was repealed before the defendant's trial and eventual sentence. Id. ¶ 1. Lucero focused on which statutory sentencing enhancement was applicable; it did not speak to the narrow question at issue in this case, which is the date that triggers the ten-year period in the habitual offender statute.
{15} The plain meaning of the language of the habitual offender statute requires calculation of the ten-year period from the date of *1018 the current conviction. We therefore reverse the trial court's decision to calculate the ten-year period from the date of re-sentencing. Pursuant to our holding, Defendant's prior conviction, for which he completed parole on July 4, 1993, should be used for enhancement of the convictions in the present case. In addition, the parties agree that Defendant's conviction from June 26, 1996, should be used for enhancement purposes. Therefore, Defendant has two applicable prior convictions.
CONCLUSION
{16} For the foregoing reasons, we reverse the sentence of the trial court and remand for re-sentencing consistent with this opinion.
{17} IT IS SO ORDERED.
WE CONCUR: IRA ROBINSON and RODERICK T. KENNEDY, Judges.
