
956 N.E.2d 38 (2011)
Marc RANDOLPH, Appellant-Petitioner,
v.
Edwin BUSS, Commissioner of Indiana Department of Correction, Donald Stine, Superintendent of New Castle Correctional Facility; and Gregory F. Zoeller, Attorney General of Indiana, Appellees-Respondents.
No. 33A04-1010-MI-684.
Court of Appeals of Indiana.
July 26, 2011.
*39 Stephen Owens, Public Defender of Indiana, Vickie Yaser, Deputy Public Defender, Indianapolis, IN, Attorneys for Appellant.
Gregory F. Zoeller, Attorney General of Indiana, Frances Barrow, Deputy Attorney General, Indianapolis, IN, Attorneys for Appellees.

OPINION
MAY, Judge.
Marc Randolph appeals the denial of his Petition for Writ of Habeas Corpus. He contends the Indiana Department of Correction (IDOC) wrongly withheld a portion of educational credit time he earned pursuant to Ind.Code § 35-50-6-3.3. We affirm.

FACTS AND PROCEDURAL HISTORY
On October 2, 1995, Randolph was sentenced to twenty-eight years of incarceration. On December 17, 2006, while serving his sentence, he earned a bachelor's degree, which entitled him to 730 days of educational credit time pursuant to Ind. Code § 35-50-6-3.3(d)(4). His educational credit time was approved on March 8, 2007. Randolph was released on parole on April 21, 2007. At that time, the soonest he could be released, taking into account other earned credit, was October 30, 2008. Thus, on his release date, Randolph had used only 558 days of the 730 days of educational credit time he had earned.
In July 2007, Randolph violated parole and returned to prison. He asked that the remaining 127 days[1] of his educational time credit be applied to the time he had to serve for the parole violation, but the IDOC refused his request. On August 25, 2010, Randolph filed a Verified Petition for Writ of Habeas Corpus for his immediate release from incarceration, claiming the *40 IDOC improperly denied him educational credit time, the application of which would entitle him to release. After a hearing, the trial court denied Randolph's petition.

DISCUSSION AND DECISION
"Every person whose liberty is restrained, under any pretense whatever, may prosecute a writ of habeas corpus to inquire into the cause of the restraint, and shall be delivered from the restraint if the restraint is illegal." Ind.Code § 34-25.5-1-1. The purpose of a writ of habeas corpus is to determine the lawfulness of the defendant's detention. Hardley v. State, 893 N.E.2d 740, 742 (Ind.Ct.App.2008). A trial court must provide a writ of habeas corpus if a petitioner is unlawfully incarcerated and entitled to immediate release. Id.
We review for an abuse of discretion the trial court's decision regarding the defendant's petition. Id. We do not reweigh the evidence, and we consider only the evidence most favorable to the judgment and the reasonable inferences drawn therefrom. Id. Any conclusions regarding the meaning or construction of law are reviewed de novo. Beam v. Wausau Ins. Co., 765 N.E.2d 524, 528 (Ind.2002).
Ind.Code § 35-50-6-3.3 (2006) provides in relevant part:
(a) In addition to any credit time a person earns under subsection (b) or section 3 of this chapter, a person earns credit time if the person:
(1) is in credit Class I;
(2) has demonstrated a pattern consistent with rehabilitation; and
(3) successfully completes requirements to obtain one (1) of the following:
* * * * * *
(D) A bachelor's degree from an approved institution of higher learning (as defined under IC XX-XX-XX-X).
On completion of his bachelor's degree in 2006, Randolph was granted the 730 days of educational credit time provided by the statute for completion of a bachelor's degree. See Ind.Code § 35-50-6-3.3(d)(4).
To determine Randolph's new release date based on the educational credit time, the IDOC looked to another subsection of the same statute: "Credit time earned by a person under this section is subtracted from the release date that would otherwise apply to the person after subtracting all other credit time earned by the person." Ind.Code § 35-50-6-3.3(e) (2006) (emphasis added). The date on which Randolph would be eligible to be released on parole, prior to application of his educational credit, was October 30, 2008. The IDOC released Randolph on parole on April 21, 2007, which used 558 days of his 730 days of educational credit time.
After he was returned to prison for a parole violation, Randolph contends, he should have been entitled to apply the remaining 127 days of his educational credit time to reduce the time he had to serve following his parole violation. We cannot agree.
Randolph bases his argument on Renfroe v. Parke, 736 N.E.2d 797, 800 (Ind.Ct. App.2000), reh'g granted on other grounds, 743 N.E.2d 299 (Ind.Ct.App.2001), in which we held educational credit time, if not used in its entirety before the inmate is released on parole, can be applied to subsequent incarceration for parole violation. The trial court relied on IDOC v. Bogus, 754 N.E.2d 27 (Ind.Ct.App.2001). However, both of those cases were decided based on the 1993 version of Ind.Code § 35-50-6-3.3, important portions of which have since been modified. Prior to 1995, subsection (d) of Ind.Code § 35-50-6-3.3 provided: *41 "Notwithstanding IC XX-XX-X-X, a person may not be deprived of credit time earned under this section." See Ind.Code § 35-50-6-7(d) (1993). The legislature deleted that subsection, which suggests the legislature intended to give the Department of Correction discretion whether to deprive prisoners of credit time earned.
The legislature also changed the manner in which the credit time is applied. In 1993, the statute provided credit time would be "subtracted from the period of imprisonment imposed on the person by the sentencing court." Ind.Code § 35-50-6-3.3(e) (1993) (emphasis added). But when Randolph earned his educational credit, the credit time was to be "subtracted from the release date that would otherwise apply to the person after subtracting all other credit time earned by the person." Ind.Code § 35-50-6-3.3(e) (2006) (emphasis added).
These changes made the educational credit time statute consistent with other credit time statutes in Indiana Code chapter 35-50-6, as all credit time is now subtracted from the release date of the offender. See Miller v. Walker, 655 N.E.2d 47, 48 n. 3 (Ind.1995) (indicating good time credit does not reduce sentence, but instead is applied to the number of days incarcerated).
Based on the new language of the statute, we cannot hold Randolph was entitled to the unused educational time credit. Randolph's credit time was "subtracted from the release date that would otherwise apply," Ind.Code § 35-50-6-3.3(e) (2006), which permitted him an earlier release to parole. Thus, Randolph received the benefit of his educational credit time. Had he obtained his degree earlier, or if the time remaining until his release date had been longer, he would have utilized more of the credit time that he earned. As he did not, it appears the legislature intended the remainder be lost. See, e.g., Ind.Code § 35-50-6-3.3(j) ("The amount of credit time earned under this section is reduced to the extent that application of the credit time would otherwise result in: (1) postconviction release (as defined in Ind.Code § 35-40-4-6); or (2) assignment of the person to a community transition program; in less than forty-five (45) days after the person earns the credit time.").
Accordingly, we affirm the denial of Randolph's petition for writ of habeas corpus based on his incorrect assertion that he was entitled to "unused" days of educational credit time.
Affirmed.
BAKER, J., and BRADFORD, J., concur.
NOTES
[1]  Randolph calculates his "unused time" thus: "730 days authorized by statute, minus 558 days applied, minus 45 days reduced by I.C. XX-XX-X-X.3(j) = 127 days." (Br. of Appellant at 4, fn. 4.) Ind.Code § 35-50-6-3.3(j) states:

The amount of credit time earned under this section is reduced to the extent that application of the credit time would otherwise result in:
(1) postconviction release (as defined in Ind.Code § 35-40-4-6); or
(2) assignment of the person to a community transition program; in less than forty-five (45) days after the person earns the credit time.
