
800 N.E.2d 799 (2003)
342 Ill. App.3d 518
279 Ill.Dec. 511
The PEOPLE of the State of Illinois, Plaintiff-Appellee,
v.
David YOUNGERMAN, Defendant-Appellant.
No. 1-01-3723.
Appellate Court of Illinois, First District, Sixth Division.
July 18, 2003.
*801 F. Thomas Hecht and Ryan E. Yagoda, Ungaretti & Harris, Chicago, for Defendant-Appellant.
Richard A. Devine, State's Attorney, County of Cook, and Renee Goldfarb, Mary L. Boland and Carrie E. Strobel, Assistant State's Attorneys, Chicago, for Plaintiff-Appellee.
Justice TULLY delivered the opinion of the court:
Defendant appeals from two orders of the circuit court of Cook County which denied his motion for discharge or conditional release from the custody of the Illinois Department of Human Services (the Department), and granted the State's motion to amend his "Thiem date," the designated date marking the end of the maximum period of his involuntary commitment. He maintains that the trial court's ruling on his motion was manifestly erroneous and in violation of his due process rights, and that the court erred in granting the State's motion in the absence of authority or proper evidence. We affirm in part, reverse in part, and remand with directions.

BACKGROUND
On March 7, 1989, defendant was found not guilty by reason of insanity (NGRI) on charges of attempted murder, aggravated battery and armed violence arising out of an attack on his father. He was found to be in need of inpatient mental health treatment and was remanded to the Elgin Mental Health Center. In accordance with section 5-2-4(b) of the Unified Code of Corrections (the Code) (Ill.Rev.Stat.1989, ch. 38, par. 1005-2-4, recodified as amended at 730 ILCS 5/5-2-4(b) (West 2002)) a date establishing the maximum period of his involuntary commitment, or Thiem date (see People v. Thiem, 82 Ill.App.3d 956, 962, 38 Ill.Dec. 416, 403 N.E.2d 647 (1980)), was established as December 12, 2002.
Defendant absented himself from the Elgin facility on May 23, 1990, after receiving grounds pass privileges, or, to use the parlance of the mental health profession, defendant "eloped" from the facility. On March 14, 1994, defendant surrendered himself in Seattle, Washington, and was sent to the Chester Mental Health Center. On September 5, 1996, he was transferred back to Elgin, and, in 1999, he was moved to the Alton Mental Health Center.
A treatment team at the Alton facility issued a report to the court on October 24, 2000. The report stated that defendant did not exhibit any signs or symptoms of a major mental illness, and that he had not been a behavior problem during this residency. The report also reflected that defendant has a master's degree and that he reads frequently, that he discusses his treatment plan and legal issues with his treatment manager and that he has agreed to link with a community mental health *802 clinic upon discharge. Defendant has also verbalized that his assault on his father was irrational, that the use of violence is not a viable, problem solving tool, and that in the future he would walk away from an argument rather than solve a dispute with violence.
The team, however, diagnosed him with an Axis II personality disorder, not otherwise specified, and reported that he displays rigid thinking "with narcissistic-perception of the situation." The team concluded that defendant had made progress, but in its opinion, his current placement continued to be appropriate.[1]
On December 14, 2000, defendant, through counsel, filed a petition for discharge or conditional release pursuant to section 5-2-4(e) of the Code. See 730 ILCS 5/5-2-4(e) (West 2000). Defendant alleged that he was not suffering from any mental illness, that he was not subject to involuntary admission, and that he was not in need of mental health services on an inpatient basis. See 730 ILCS 5/5-2-4(a)(1)(A), (B) (West 2000).
On February 6, 2001, the State filed a motion to amend defendant's Thiem date to October 2, 2006, to reflect the nearly four years defendant had absented himself from the treatment facility and was not receiving treatment as ordered. Defendant responded with a motion to dismiss claiming that there was no legal authority to provide for such an extension.
A hearing on both motions was held on October 12, 2001. At the commencement of proceedings, defendant expressed his wish to represent himself or have the court appoint another attorney. Defendant acknowledged the previous replacement of another assistant public defender at his request, and the trial court informed him that he could not pick and choose among appointed counsel. The trial court also attempted to dissuade defendant from representing himself, but finally acceded to his request.
Dr. Carmen Mahmood, defendant's treating psychiatrist, was the only witness to testify at the hearing. After she was qualified as an expert in the field of forensic psychiatry, she testified for the State that she has been treating defendant for two years at Alton. Although defendant had the burden of proof and the burden of going forward with the evidence, the trial court allowed the State to proceed directly to its case in chief and present the testimony of Dr. Mahmood on direct examination. See 730 ILCS 5/5-2-4(g) (West 2000). Defendant did not object to the procedure and the record on appeal contains no explanation for the procedure used by the trial court. Dr. Mahmood believed that defendant was fit to appear in the hearing since he understands the significance of the proceedings, but she would not recommend his conditional release at this time.
Under cross-examination by defendant, pro se, Dr. Mahmood stated that before recommending conditional release, her team wanted to feel comfortable that defendant could take care of himself and adjust to the community without interference by his psychiatric illness. She stated that this would be accomplished through changing his setting from maximum to the less secure. Defendant had yet to be placed in the less secure setting because of *803 his disagreement over which facility would be chosen.
Dr. Mahmood acknowledged that defendant had no major psychosis and explicitly stated that defendant was not "mentally ill." However, she considered him dangerous because of his rigid thinking and inability to acknowledge his crime and his feelings. She further acknowledged that defendant had no record of violence since his crime, but referred to a letter which he sent to an employee at the Elgin Center that the recipient perceived as inappropriate and which the doctor characterized as stalking. Dr. Mahmood also stated that the treatment team believed defendant has some altered personality traits, and based on his criminal history, the team was not prepared to say that defendant should be released into the community. She testified she was unsure of whether defendant would injure someone in the future.
The trial court indicated that it was denying defendant's petition for discharge or conditional release. In response, defendant moved for the appointment of a psychiatrist for an independent examination and argued that he had not been allowed to present his case. The State objected that the motion was untimely. Defendant responded that on February 28, 2001, he had made an oral request for an independent examination. The record on appeal, however, does not contain a report of proceedings for that date. After allowing defendant to argue his case, the trial court denied defendant's motion, denied his petition for discharge, and held that he could file a new petition after waiting the 120 days required by section 5-2-4(e) of the Code.
The parties then presented their arguments on the State's motion to extend defendant's Thiem date. Defendant objected that the request was untimely, coming seven years after he surrendered. The trial court found that there was no clear case law on the subject but, as a "simple matter of common sense," found that he should not be credited for the time he absented himself from the institution. The trial court then amended defendant's Thiem date to add an additional 46 months establishing October 12, 2006, as the new Thiem date. This appeal follows.

DISCUSSION
Defendant contends that the trial court erred in extending his Thiem date. He maintains that the statute provides no basis for amending a Thiem date as requested by the State's motion, and the motion, filed seven years after his return to the facility, should have been denied.
When a defendant is found NGRI and subject to involuntary admission or in need of mental health services on an inpatient basis, the court must commit the defendant to the Department. 730 ILCS 5/5-2-4(b) (West 2002); People v. Palmer, 148 Ill.2d 70, 83, 170 Ill.Dec. 260, 592 N.E.2d 940 (1992). Section 5-2-4(b) also requires the trial court to set a maximum period of involuntary commitment which:
"shall not exceed the maximum length of time that defendant would have been required to serve, less credit for good behavior, before becoming eligible for release had he been convicted of and received the maximum sentence for the most serious crime for which he has been acquitted by reason of insanity. The Court shall determine the maximum period of commitment by an appropriate order." 730 ILCS 5/5-2-4(b) (West 2000).
The maximum period of commitment is determined by reference to maximum sentence permitted under the existing sentencing scheme reduced by the maximum *804 potential credit for good behavior (In re Commitment of Guy, 126 Ill.App.3d 267, 269, 81 Ill.Dec. 450, 466 N.E.2d 1252 (1984)), and the date ending the maximum period of involuntary commitment is referred to as the "Thiem date" (People v. Cross, 274 Ill.App.3d 159, 161, 210 Ill.Dec. 846, 653 N.E.2d 1308 (1995)).
In this case, defendant was found NGRI of attempted murder and subject to involuntary admission. In accordance with section 5-2-4(b), the trial court set his Thiem date as December 12, 2002, reflecting the maximum sentence for the most serious crime of attempted murder. On February 6, 2001, the State filed a motion requesting that this date be extended to exclude from the period of commitment the period during which defendant eloped or absented himself from the facility.
At the hearing on this motion, defendant asserted that the request was untimely. The trial court responded that it was not aware of any timeliness issues on a Thiem date, and that while the case law was not clear on this issue, as a matter of common sense, the trial court determined that defendant would not get credit for the time he had absented himself from the Department. The date was then set back to account for his absence. We find no error in the trial court's ruling that a modification of defendant's Thiem date was required.
We believe that the issue raised in this case is created, in part, by ambiguity related to the use of the phrase "Thiem date." The phrase "Thiem date" is a useful shorthand for "the maximum period of commitment," and is commonly used by attorneys and judges. Earlier reported decisions have referred to Thiem dates, the State's motion asked the trial court to modify the Thiem date, the parties referred to modification of the Thiem date in their briefs and at oral argument, and we have used the term "Thiem date" in this opinion. However, we believe that use of the term "Thiem date" only serves to obscure the real issue in this case. The Code does not require the trial court to set a Thiem date, instead, the code requires a trial court to establish a "maximum period of commitment." Although trial courts routinely identify the date on which a defendant's involuntary commitment must end, those dates are based on the assumption that a defendant's period of commitment will include the entire period between the entry of the commitment order and the calculated Thiem date. It is the validity of that assumption and the meaning of the phrase "period of commitment" that lies at the heart of the case before us.
In other words, the issue in this case involves a matter of statutory interpretation, and we must determine whether a defendant's "period of commitment" includes those periods during which he has eloped or absented himself from the treatment facility without authorization. When interpreting a statute a court's primary goal is to ascertain and give effect to the intent of the legislature, and that the best evidence of that intent is the statutory language. People v. Donoho, 204 Ill.2d 159, 171, 273 Ill.Dec. 116, 788 N.E.2d 707 (2003). The Code does not define "period of commitment." Accordingly, our primary task is to give those words their plain ordinary meaning. See Donoho, 204 Ill.2d at 171, 273 Ill.Dec. 116, 788 N.E.2d 707. We determine, as the trial court did, that a common sense interpretation of the phrase "period of commitment" does not include those periods during which a NGRI acquittee has eloped from the treatment facility to which he was remanded. Moreover, we believe that an examination of the purposes of the Code supports this interpretation. The commitment required by section 5-2-4 of the Code serves two *805 purposes: (1) it allows for the treatment of the individual's mental illness; and (2) it protects the individual and society from his potential dangerousness. People v. Pastewski, 164 Ill.2d 189, 197, 207 Ill.Dec. 316, 647 N.E.2d 278 (1995) quoting People v. Williams, 140 Ill.App.3d 216, 228, 94 Ill. Dec. 650, 488 N.E.2d 649 (1986). Numerous provisions in section 5-2-4 reflect these purposes. For example, the facility director must file a treatment plan for an insanity acquittee within 30 days after admission and every 60 days thereafter. 730 ILCS 5/5-2-4(b) (West 2002). Further, section 5-2-4 requires that insanity acquittees be placed in secure facilities and that they not be permitted in the community in any manner except as allowed by a plan approved by the trial court. 730 ILCS 5/5-2-4(b) (West 2002).
During the period while defendant had eloped from the facility, neither of the purposes of the commitment provision of the Code was being served. Defendant was present in the community without court authorization, and it was impossible to provide him with any treatment for his mental illness. Therefore, we determine that the period of defendant's unauthorized absence, or elopement, from the facility did not constitute a period of commitment within the meaning of the Code. Accordingly, we conclude that the trial court was authorized to amend defendant's Thiem date. We believe that doing so did not change the "maximum period of commitment" authorized by the statute. Instead, by amending defendant's Thiem date the trial court merely modified its commitment order to reflect that defendant's absence from the facility was not part of his period of commitment.
Defendant further argues that the State's motion should have been denied under the doctrine of laches. This equitable defense bars claims by those who neglect their rights to the detriment of others, and requires a showing of a lack of due diligence by the party asserting the claim and prejudice to the party asserting the doctrine. People v. Wells, 182 Ill.2d 471, 490, 231 Ill.Dec. 311, 696 N.E.2d 303 (1998).
In this case defendant "surrendered" himself to the Department in 1994 and the State filed its motion to amend the Thiem date in 2001. The record in this court reveals that defendant filed three unsuccessful petitions for discharge (see People v. Youngerman, No. 1-97-3128, 299 Ill.App.3d 1125, 251 Ill.Dec. 267, 740 N.E.2d 97 (1998)(unpublished order under Supreme Court Rule 23) and cases cited therein) during that time period, but there is no record of any comparable attempt to amend the Thiem date by the State. The attempt, coming seven years later, may not be described as diligent, but it is apparent that the date only became significant when the Department continued to recommend inpatient treatment for defendant. In that respect, we do not construe the lapse in time as an instance of the State knowingly sleeping on its rights to the detriment of defendant. See Wells, 182 Ill.2d at 490, 231 Ill.Dec. 311, 696 N.E.2d 303.
However, even if it we were to construe the delay as a lack of diligence on the part of the State, we find that defendant failed to show how he was prejudiced by the State's request. The amended order reflected the original commitment period with the adjustment to account for his unauthorized absence which we have determined was not part of his period of commitment. In addition, defendant offered no evidence or argument to the court as to how he was prejudiced, and here offers only speculative arguments that it would be impossible for him "to prove that he was tricked into leaving Elgin or that *806 the Elgin staff consented to his leaving after he informed them of his desire to leave." As the State points out, defendant informed the court that he "turned himself in" while he was in Seattle, and did not object when the court stated that he had "absented" himself from the Department for nearly four years. Thus, the record belies his claims, and his further unsupported argument that the State's inaction amounted to subterfuge does not establish prejudice to warrant the application of laches in this case.
Finally, we note that defendant argues that the amended Thiem date established by the trial court was incorrect. Defendant's original Thiem date was December 12, 2002. In its motion, the State argued that the amended date should have been October 2, 2006. On appeal, defendant argues that the proper date should have been October 3, 2006. The trial court set the amended Thiem date as October 12, 2006. The trial court arrived at this date by calculating that defendant was absent from the facility for two months less than four years and adding that length of time to his original Thiem date. We find that the trial court erred when it rounded the length of defendant's absence up to a number of whole months. We believe that an apt analogy can be drawn with the rules for crediting a criminal defendant for time served in custody prior to sentencing. In such cases a defendant is entitled to one day of credit for each day (or portion thereof) that he spends in custody prior to sentencing, including the day he is taken into custody. See People v. Ligons, 325 Ill.App.3d 753, 759, 259 Ill.Dec. 689, 759 N.E.2d 169 (2001). In this case, defendant eloped from the facility on May 23, 1990. We find that because he was "in custody" for a portion of that day that he is entitled to one day of credit against the maximum period of his commitment for that day. Defendant surrendered himself to authorities in Seattle on March 14, 1994. Similarly, we find that because he was "in custody" for a portion of that day he is entitled to one day of credit against the maximum period of his commitment for that day. The interval between those dates is 1,390 days. By adding 1,390 days to the original Thiem date of December 12, 2002, we arrive at a new Thiem date of October 2, 2006. We conclude that the date calculated by the State in its motion was correct and that the trial court erred by considering the number of months defendant had eloped rather than the number of days. Defendant's calculation is incorrect because he fails to credit himself for the partial days he was "in custody." Therefore, on remand we direct the trial court to enter a new commitment order reflecting a revised Thiem date of October 2, 2006. We emphasize, however, that although we have used the "Thiem date" terminology commonly referred to in NGRI commitments, that language is merely short hand for "the maximum period of commitment." As we observed above, the maximum period of defendant's commitment has not changed and the Thiem date we have calculated merely reflects the date upon which the maximum period of commitment will be reached, if defendant remains committed and does not again elope from the facility.
Defendant also contends that the trial court erred when it denied his petition for discharge or conditional release. Defendant presents several arguments challenging the trial court's finding that he is dangerous. Defendant alternatively argues that, even if he is dangerous, he is not subject to continued commitment because Mahmood's testimony unequivocally established that he is not mentally ill. The State responds that, even if defendant is not mentally ill, the Code authorizes the *807 State to commit him until his Thiem date on the basis of dangerousness alone.
The parties' arguments present a constitutional issue that is not clearly resolved by the precedents cited in the parties' briefs, and our own research has not revealed case law directly on point. The leading case addressing the constitutionality of the confinement of NGRI acquittees is Foucha v. Louisiana, 504 U.S. 71, 112 S.Ct. 1780, 118 L.Ed.2d 437 (1992). In Foucha, the Supreme Court addressed the constitutionality of a Louisiana statute that allowed for the continued commitment of insanity acquittees until they proved that they were not dangerous, whether or not they were mentally ill. The Court reaffirmed the general rule that the state may not confine a mentally ill person unless it proves by clear and convincing evidence that the individual is both mentally ill and dangerous. Foucha, 504 U.S. at 80, 112 S.Ct. at 1786, 118 L.Ed.2d at 448. The Court observed that in United States v. Salerno, 481 U.S. 739, 107 S.Ct. 2095, 95 L.Ed.2d 697 (1987), it had upheld provisions of the Bail Reform Act of 1984 which allowed for the pretrial detention of individuals who posed a danger to others or to the community. However, the Court distinguished Salerno noting that the duration of such confinement was strictly limited by speedy trial requirements. Foucha, 504 U.S. at 81, 112 S.Ct. at 1786, 118 L.Ed.2d at 449. The Supreme Court concluded that, in our society, liberty is the norm, and detention prior to trial or without trial is a carefully limited exception that the Court would not apply to "a law like Louisiana's, which permits the indefinite detention of insanity acquittees who are not mentally ill but who do not prove they would not be dangerous to others." (Emphasis added.) Foucha, 504 U.S. at 83, 112 S.Ct. at 1787, 118 L.Ed.2d at 450.
In People v. Hager, 253 Ill.App.3d 37, 192 Ill.Dec. 272, 625 N.E.2d 232 (1993), this court considered the limitations of Foucha as applied to the commitment provisions of section 5-2-4 of the Code. In Hager, the defendant was a NGRI acquittee who was mentally ill, but the only expert who testified at the commitment hearing testified that the defendant would not pose a danger to himself or to others in the near future. The Hager court restated the holding of Foucha as "Once a defendant is involuntarily admitted, he may be held only as long as he is both mentally ill and dangerous." Hager, 253 Ill.App.3d at 41, 192 Ill.Dec. 272, 625 N.E.2d 232. The reviewing court concluded that because the State did not prove that the defendant was dangerous he could not be involuntarily confined. Hager, 253 Ill.App.3d at 42, 192 Ill.Dec. 272, 625 N.E.2d 232.
We find that neither Foucha nor Hager resolves the constitutional issue raised by the case before us. Unlike the defendant in Foucha, defendant is not subject to indefinite commitment. As we observed above, his Thiem date sets an upper limit on the period of his commitment. Further, the evidence in this case presents the opposite factual scenario to that presented in Hager. There, the expert testified that the defendant was mentally ill but not dangerous, while here, the expert testified that defendant was dangerous but not mentally ill. Accordingly, we are presented with the question of whether it is constitutionally permissible for the State to confine a NGRI acquittee who is dangerous but not mentally ill for a determinate period of time, i.e., until his Thiem date.
Although we have identified an unresolved constitutional question, we decline to address it in this case. Generally, courts should avoid addressing constitutional questions if they are unnecessary to *808 a resolution of the case. See In re Detention of Traynoff, 338 Ill.App.3d 949, 273 Ill.Dec. 691, 789 N.E.2d 865 (2003). As the Traynoff court observed, "Courts are not to compromise the stability of the legal system by declaring legislation unconstitutional when a particular case does not require it." Traynoff, 338 Ill.App.3d at 957, 273 Ill.Dec. 691, 789 N.E.2d 865, citing Trent v. Winningham, 172 Ill.2d 420, 425, 217 Ill.Dec. 741, 667 N.E.2d 1317 (1996). We believe that it is inappropriate to address this constitutional issue because our examination of the record has revealed a procedural defect that requires remand. Although the parties did not fully address this issue in their briefs, the matter was addressed during oral argument. Moreover, as our supreme court has recently observed, the responsibility for a just result and for the maintenance of a sound and uniform body of precedent sometimes overrides the considerations of waiver that would ordinarily bar this court from considering issues not properly presented in the parties' briefs. See People v. De La Paz, 204 Ill.2d 426, 435-37, 274 Ill.Dec. 397, 791 N.E.2d 489 (2003).
During the hearing on his petition for discharge, defendant requested an independent psychiatric examination. Section 5-2-4(f) provides: "If requested by either the State or the defense of if the Court feels it is appropriate, an impartial examination of the defendant by a psychiatrist or clinical psychologist * * * shall be ordered, and the report considered at the time of the hearing." 730 ILCS 5/5-2-4(f) (West 2000). This language is mandatory and a request for an independent examination is not subject to the trial court's discretion. People v. Bledsoe, 268 Ill.App.3d 869, 872, 206 Ill.Dec. 406, 645 N.E.2d 411 (1994). The Bledsoe court observed that without an independent examination the only witnesses likely to testify regarding a petition for discharge are the defendant and the treating psychiatrist. Bledsoe, 268 Ill.App.3d at 872, 206 Ill.Dec. 406, 645 N.E.2d 411. The court further held: "The right to obtain an independent psychiatric examination, therefore, is often necessary to effectuate the right to a fair hearing on a petition for discharge." Bledsoe, 268 Ill.App.3d at 872, 206 Ill.Dec. 406, 645 N.E.2d 411.
In the case before us, defendant unequivocally requested an independent examination and the trial court denied defendant's request. We note that the request was made after the hearing had begun and after Mahmood had testified. However, we do not believe that, under the circumstances of this case, the question of timeliness warranted denial of defendant's request. First, the Code does not specify either a specific form for a request for an independent examination or provide a time limit for making such a request. To the contrary, this court has previously held that the legislature intended to make it "simple" for a NGRI acquittee to obtain an independent examination and a hearing on his petition. People v. Shelton, 281 Ill.App.3d 1027, 1035, 217 Ill.Dec. 473, 667 N.E.2d 562 (1996). Second, although the trial court had already commenced the hearing on defendant's petition, it granted defendant leave to discharge the public defender representing him shortly before the hearing began. We do not believe that the brief delay before requesting an independent examination was unreasonable for a pro se defendant. Further, we believe that this delay is understandable in light of the trial court's decision to allow the State to proceed with its case in chief prior to allowing defendant to present his case. Finally, defendant alleged that he had previously attempted to request an independent examination at a time while he was represented by the Public Defender's office. We find it significant that the trial court made no apparent attempt to verify *809 this allegation. Therefore, we conclude that the trial court erred when it denied defendant's request for an independent examination. Accordingly, we remand this matter to the trial court. On remand, the trial court shall order an independent examination and conduct a new hearing on defendant's petition within 120 days.

CONCLUSION
We conclude that the trial court properly "amended" defendant's Thiem date because amending the Thiem date to reflect the period during which defendant had eloped from the facility did not increase the maximum period of his commitment. We conclude, however, that the trial court erred when it calculated the amended Thiem date by rounding the period of defendant's unauthorized absence up to a period of months instead of calculating the number of days defendant was absent. Therefore, we affirm that portion of the trial court's order which granted the State's motion to amend defendant's Thiem date, but reverse the portion of the order establishing the date. On remand, we direct the trial court to enter an amended order setting defendant's Thiem date as October 2, 2006. We also conclude that the trial court erred when it denied defendant's request for an independent examination. Therefore, we reverse the trial court's order denying defendant's petition for discharge or conditional release. On remand, we direct the trial court to order an independent examination and conduct a hearing on defendant's petition within 120 days.
Affirmed in part, reversed in part, and remanded with directions.
GALLAGHER and FROSSARD, JJ., concur.
NOTES
[1]  We allowed defendant to supplement the record on appeal with the February 26, 2002, report to the court from the clinical coordinator and treating supervisor of the Alton Mental Health Center. See People v. Grant, 295 Ill.App.3d 750, 761, 230 Ill.Dec. 129, 692 N.E.2d 1295 (1998). This report, which post-dated the hearing on defendant's petition, reflected the continuing opinion of the treatment team that defendant was in need of inpatient mental health services although he was not subject to involuntary admission.
