
935 N.E.2d 1245 (2010)
Douglas DENZELL, Appellant-Defendant,
v.
STATE of Indiana, Appellee-Plaintiff.
No. 49A02-1001-CR-89.
Court of Appeals of Indiana.
October 29, 2010.
Deborah Markisohn, Marion County Public Defender Agency, Indianapolis, IN, Attorney for Appellant.
Gregory F. Zoeller, Attorney General of Indiana, Ellen H. Meilaender, Deputy Attorney General, Indianapolis, IN, Attorneys for Appellee.


*1246 OPINION
NAJAM, Judge.

STATEMENT OF THE CASE
Douglas Denzell appeals the trial court's denial of his motion to dismiss a criminal charge against him. Denzell presents a single issue for review: whether the denial of his motion to dismiss violated his due process rights because, due to his incompetence to stand trial, he had already been confined longer than the maximum sentence the trial court could have imposed following a conviction.
We affirm.

FACTS AND PROCEDURAL HISTORY
On July 17, 2008, a citizen flagged down Indianapolis Metropolitan Police Department Officer Thomas J. Aguilar near a bar in Broad Ripple. The citizen reported that Denzell had refused several requests to leave the bar. Officer Aguilar also asked Denzell to leave, but Denzell refused. The officer noted that Denzell's "gait was wobbly, his speech was slurred, [and] his eyes were glassy and bloodshot." Appellant's App. at 52. Officer Aguilar walked up behind Denzell in order to arrest him. When the officer asked Denzell to put his hands behind his back, Denzell turned around, "clenched up his left wrist and began to pull it back into his chest area and turned around with his right hand and threw a cigarette, balled his hand up as if he was going to punch [the officer.]" Id. With the assistance of another officer, Officer Aguilar took Denzell to the ground and, following further struggle, arrested Denzell. The State charged Denzell with resisting law enforcement, as a Class A misdemeanor, and public intoxication, as a Class B misdemeanor.
On July 31, the court ordered a competency evaluation. On August 21, Dr. Phillip M. Coons, M.D., performed an evaluation of Denzell, and Dr. George F. Parker, M.D., prepared his evaluation on August 25. Both psychiatrists found that Denzell was not capable of assisting counsel in his defense, but Dr. Parker concluded that Denzell could respond to treatment and regain competence to stand trial in the foreseeable future. As a result, on August 28 the trial court ordered Denzell committed to the State Department of Mental Health and Addiction ("DMHA") for competency restoration services. Following acknowledgement by the Family and Social Services Administration ("FSSA") of the State's confinement authority, on September 5 Denzell was transported to Larue D. Carter Memorial Hospital in Indianapolis.
On September 26, FSSA reported to the trial court that Denzell had been restored to competence and was capable of standing trial. But in October, before Denzell was returned to the custody of the court, FSSA reported that Denzell had decompensated due to failure to comply with his treatment regimen and was no longer competent. On November 25, FSSA reported to the trial court that Denzell had again been restored to competence and was capable of standing trial. Denzell was then returned to the custody of the court.
On December 11, Denzell requested to be placed in the mental health diversion program, and the trial court released him on his own recognizance. And on February 24, 2009, Denzell executed the diversion program agreement. But in June, he became noncompliant with his treatment regimen and failed to show for appointments. And on June 26, he did not appear for a hearing before the trial court. As a result, the court issued an arrest warrant. *1247 Denzell was returned to state custody on August 6.
On August 7, the court ordered another competency evaluation. Dr. Coons and Dr. Stephanie Callaway interviewed Denzell, and both psychiatrists concluded that he was unable to assist in his defense at trial but could be restored to competence with treatment. On September 9, the court again entered a commitment order. On the same day, Denzell filed a motion to dismiss the charges on the grounds that he had already served, with credit time earned, more than the maximum possible sentence that the trial court could impose if he were convicted of the charged offense. On September 23, the State filed a response to the motion, opposing dismissal on two grounds: (1) that mental health professionals had determined that Denzell might yet be restored to competency and therefore case law did not require dismissal, and (2) that the State had compelling interests sufficient to overcome Denzell's liberty interest.
On October 8, Denzell was transported to his treatment facility, the Logansport State Hospital. On November 20, the trial court denied his motion to dismiss. On December 9, that court certified the order for interlocutory appeal.[1]

DISCUSSION AND DECISION
Denzell contends that the trial court abused its discretion when it denied his motion to dismiss. Specifically, he argues that the charges against him should have been dismissed because he has served more time in pre-trial custody than the trial court could have imposed at sentencing. In support, Denzell cites State v. Davis, 898 N.E.2d 281 (Ind.2008). The State counters that Davis does not apply on the present facts and, therefore, dismissal was not required. We conclude that Denzell has not satisfied the test announced in Davis and, therefore, that the trial court did not abuse its discretion when it denied his motion to dismiss.
In Davis, our supreme court considered whether it was "a violation of fundamental fairness to hold criminal charges over the head of an incompetent defendant who will never be able to stand trial." Id. at 283. The court observed that the defendant had a substantial liberty interest in being free from involuntary commitment. The court further observed:
Justification for the commitment of an incompetent accused is found in the State's interest in the restoration of the accused to competency because of the right of the public and the defendant to the prompt disposition of criminal charges pending against him, Strunk v. United States, 412 U.S. 434, 439 n. 2 [93 S.Ct. 2260, 37 L.Ed.2d 56] (1973), and the protection of the accused against being required to answer to charges that she lacks the capacity to understand or to assist her attorney in defending against. Drope[ v. Missouri, 420 U.S. 162, 171, 95 S.Ct. 896, 43 L.Ed.2d 103 (1975)].
Id. at 289.
Significantly, the accused in Davis had been found unlikely ever to regain competency to stand trial, and the court had determined that Davis could not be restored to competency. The court held that under those circumstances the State would have to show "some legitimate interest in determining the guilt or innocence of [the] accused even though the accused, in effect, had already been punished." Id. But the State had offered no legitimate interest in determining the guilt or innocence of the accused that outweighed the accused's substantial *1248 liberty interest. Therefore, the court held:
Because Davis' pretrial confinement has extended beyond the maximum period of any sentence the trial court can impose, and because the State has advanced no argument that its interests outweigh Davis' substantial liberty interest, we conclude it is a violation of basic notions of fundamental fairness as embodied in the Due Process Clause of the Fourteenth Amendment to hold criminal charges over the head of Davis, an incompetent defendant, when it is apparent she will never be able to stand trial.
Id. at 290.
Following Davis, this court considered whether an arrestee's due process rights had been violated where he had not yet been confined beyond the maximum possible sentence for the offense charged but the court had not yet determined whether there was a reasonable likelihood that his competency could be restored. In Habibzadah v. State, 904 N.E.2d 367 (2009), trans. denied, the defendant had been charged with attempted murder, which carries a maximum sentence of fifty years. At the time he filed his motion to dismiss the charge, he had been committed for treatment for more than two years. We held that, "[b]ecause it is possible that Habibzadah may be restored to competency and because he has not been confined for longer than the potential maximum sentence he faces, the trial court did not abuse its discretion in denying his motion to dismiss." Id. at 369 (citing Davis, 898 N.E.2d at 285).
Under Davis and Habibzadah, a refusal to dismiss charges against an accused may violate his due process rights only if (1) the accused has been committed for treatment longer than the maximum possible sentence that could be imposed upon conviction, and (2) the court has not yet determined that the accused has no reasonable likelihood of being restored to competency. Davis, 898 N.E.2d at 285, 290; Habibzadah, 904 N.E.2d at 369. If both of these conditions have been met, then we must balance the substantial liberty interest of the accused against any "legitimate interest [of the State] in determining the guilt or innocence of [the] accused even though the accused, in effect had already been punished." Davis, 898 N.E.2d at 289.
For example, a conviction would be required to enhance a sentence for a felony committed as a member of a criminal gang, to prohibit possession of a firearm, to require registration as a sex offender, or to prove status as a habitual offender, a habitual substance offender, or a habitual traffic offender.
Id. (citations omitted).
Here, the State does not challenge Denzell's allegation that he has been detained in pretrial commitment for a period exceeding the maximum potential sentence that could be imposed.[2] Thus, the question here is whether keeping the State's charges alive violates Denzell's due process rights where he has been committed for treatment longer than his maximum possible sentence but the court has not yet determined that there is no reasonable likelihood that he will be restored to competency. On such facts, Denzell does not satisfy the test in Davis and Habibzadah to show a due process violation because there remains the possibility that he will *1249 be restored to competency, even though he cannot be sentenced to an additional term if convicted.
Finally, Denzell argues that "public policy considerations suggest it is prudent for the trial court to grant [his] motion to dismiss." Appellant's Brief at 22. Indiana Code Section 35-36-3-3 sets forth the proceeding for the commitment of defendants who have been determined unlikely to be restored to competency. Denzell contends that we should construe Section 35-36-3-3 "to apply only where individuals are subject to additional pretrial detention" in order to make "better use of finite resources." Id. "The public interest may be better served by requiring dismissal of pending criminal charges where the accused has already served at least the maximum time in custody were he or she to be convicted." Id. In essence, Denzell asks us to ignore the law as set out in Davis and applied in Habibzadah. This we will not do.
Denzell was committed for treatment under our competency statute, Indiana Code Section 35-36-3-1. We have declared that statute to be constitutional. Hensley v. State, 575 N.E.2d 1053, 1056 (Ind.Ct.App.1991), trans. denied. The State has legitimate interests in the pretrial commitment of an incompetent accused in order to restore the accused to competency. Specifically, the public and the defendant have a right to the prompt disposition of criminal charges pending against her, and the accused has the right to protection from being required to answer for charges that he lacks the capacity to understand or to assist his attorney in defending against. See Davis, 898 N.E.2d at 289. The facts in this case do not satisfy the test set out in Davis and Habibzadah because, at the time he filed his motion to dismiss, there had been no determination made that Denzell was unlikely to be restored to competency. See id. Denzell has not shown a due process violation. Therefore, he has not shown that the trial court abused its discretion when it denied his motion to dismiss.
Although we conclude that Denzell has not demonstrated a due process violation, the facts of his case warrant further discussion. The record shows that Denzell has twice been determined to be competent while in treatment and on medication. In each instance, Denzell was released pending trial but decompensated due to noncompliance with his treatment regimen. We analogize this situation to periods of pretrial confinement pending trial as contemplated by Indiana Rule of Criminal Procedure 4. That rule refers to "a period in aggregate embracing more than" six months or one year, depending on the subsection. See Ind. Cr. R. 4(A), (C). The use of the "aggregate" term shows that Criminal Rule 4 contemplates tacking periods of confinement for purposes of calculating a total period of confinement. Calculating the period of confinement in the present case should be treated similarly. Thus, here, where Denzell has been restored to competency and then decompensated, resulting in more than one period of confinement under a charge, the aggregate period of confinement should be used to determine whether he has satisfied the test for discharge set out in Davis and applied in Habibzadah.
Affirmed.
BAKER, C.J., and MATHIAS, J., concur.
NOTES
[1]  Briefing in this case was consolidated with Cause No. 49A04-0912-CR-740.
[2]  At the time he filed his motion to dismiss, Denzell had served 183 actual days, or 366 days counting credit time under Indiana Code Section 35-50-6-3(a). Under Davis, we include credit time when calculating the period or pretrial commitment for purposes of the present analysis. See 898 N.E.2d at 289.
