
85 Wis.2d 257 (1978)
270 N.W.2d 402
STATE EX REL. DEISINGER, Respondent,
v.
TREFFERT, M.D., Superintendent Winnebago Mental Health Institute, Appellant.
No. 76-714.
Supreme Court of Wisconsin.
Argued September 7, 1978.
Decided October 3, 1978.
*260 For the appellant the cause was argued by Pamela Magee-Heilprin, assistant attorney general, with whom on the briefs was Bronson C. La Follette, attorney general.
For the respondent there was a brief and oral argument by Howard B. Eisenberg, state public defender.
COFFEY, J.
There are two issues on appeal:
1. Is sec. 971.14(5), Stats., constitutionally violative of the petitioner's due process rights as a person incarcerated as an incompetent to stand trial in that the statute permits custody over the petitioner for a longer period than if the petitioner had been sentenced to the maximum period provided by sec. 947.01(1), Stats?
2. Whether the petitioner should receive sentence credit for time spent during pretrial commitment awaiting the petitioner's competency to stand trial, notwithstanding that the petitioner has not yet been determined competent to stand trial?
The subject of this appeal is the alleged unconstitutionality of sec. 971.14(5), Stats. Sec. 971.14(5) was amended by ch. 153, Laws of 1975, and presently reads:
*261 "(5) If the court determines that the defendant lacks competency to proceed, the proceeding against the defendant shall be suspended and the court shall commit the defendant to the custody of the department to be placed in an appropriate institution of the department. The defendant shall be reexamined at 6-month intervals following commitment, or during any interim period if the department files a written report that the defendant appears to have become competent, that the defendant is not making continual progress toward regaining competency, or it has become apparent that the defendant will not soon become competent to stand trial, and a determination as to competency shall be made by the court following each reexamination. Each such determination shall be preceded by a hearing unless waived by the district attorney, defendant and defendant's counsel. If it is determined that the defendant has regained competency to proceed, the proceeding shall be resumed. At any time that it is determined that the defendant is not making further progress toward regaining competency, or if the defendant has not regained competency within 24 months of commitment, the court shall order the defendant to be discharged from the commitment subject to the right of the department or other person to proceed against the defendant under ch. 51."
Before the 1975 amendment to sec. 971.14(5), the statute provided for the release, or civil commitment of the defendant when the maximum period for which the defendant could have been imprisoned, if convicted, had elapsed. It is the deletion of this provision which prompts this constitutional challenge to sec. 971.14(5).
The deletion of the maximum sentence provision was not explained in the legislative note to Assembly Bill 257, which became ch. 153, Laws of 1975. The note's pertinent portions explain the amendment as follows:
"NOTE: This bill modifies the procedure used in handling criminal defendants whose competency to proceed is in doubt. This legislation grows out of the Wisconsin Supreme Court's ruling in State ex rel. Matalik *262 v. Schubert (1973), 57 Wis.2d 315 and State ex rel. Haskins v. Dodge County Court (1974), 62 Wis.2d 250.
"The changes in sub. (5), relating to length of commitment to determine competency, are a result of Haskins. This case follows the U. S. Supreme Court's ruling in Jackson v. Indiana (1972), 406 U. S. 715, that a defendant committed because of incompetency to proceed `cannot be held more than the reasonable period of time necessary to determine whether there is a substantial probability that he will attain that capacity in the foreseeable future.'"
As reflected in the legislative note to the 1975 amendment to sec. 971.14(5), the leading case in the area of periods of confinement for incompetents to stand trial is Jackson v. Indiana, 406 U.S. 715, 92 S. Ct. 1845, 32 L. Ed.2d 428 (1973). Jackson involved an illiterate deaf mute with no expectancy of ever being able to aid in the preparation of his defense. The United States Supreme Court struck down the Indiana statute which permitted Jackson's indefinite confinement pending his return to competency. The Supreme Court held that an incompetent's custody could not extend beyond the reasonable period necessary to determine whether there is any likelihood in the foreseeable future that the defendant could aid in his defense. The test set forth to determine what is a "reasonable period" is stated at 738:
"At least due process requires that the nature and duration of commitment bear some reasonable relation to the purpose for which the individual is committed."
Decisions since Jackson v. Indiana, supra, have interpreted the preceding phrase. These cases promote the position that the phrase incorporates the dual considerations of the period necessary to make a determination as to the accused's potential for becoming competent to stand trial as well as the length of the underlying sentence for the substantive offense.
*263 Waite v. Jacobs, 475 F.2d 392 (D. C. Cir. 1973) mandates that the expiration of the maximum sentence period is a critical date at which a defendant's rights must be determined. Waite states that an acquittee by reason of insanity must be given the same procedural safeguards as a civil committee once his maximum sentence term has expired. Supra at 399. See also, United States v. Eckes, 543 F.2d 178, 188 (D.C. Cir. 1976); United States v. Jackson, 553 F.2d 109, 119 (D.C. Cir. 1976).
The reasoning of Waite v. Jacobs, supra, relied not only upon Jackson v. Indiana, supra, but also Humphrey v. Cady, 405 U.S. 504, 92 S. Ct. 1048, 31 L. Ed.2d 394 (1972). Humphrey involved a challenge to this state's alternative sentencing procedures under the Wisconsin Sex Crimes Act. (Presently ch. 975.) Under the act at that time, one convicted of a sex crime could as an alternative to sentencing be committed to a "sex deviate facility" and that after an initial term equal to the maximum sentence which might have been imposed an offender could be periodically recommitted up to five years. The renewal period was permitted after a judicial hearing with no right to a jury. The Supreme Court in striking down the Wisconsin statute used the end of the maximum penalty period as the critical date upon which the offender must be accorded the same procedural safeguards as civil committees; minimally, a jury determination as to the party's dangerousness.
In McNeil v. Director, Patuxent Institution, 407 U.S. 245, 92 S. Ct. 2083, 32 L. Ed.2d 719 (1972), the Supreme Court again found that the maximum penalty period constituted a significant point at which a committee's rights must be determined. McNeil, who was convicted of two assaults and sentenced to five years, was referred to a mental hospital for examination as to whether he should be indefinitely committed under Maryland's Defective Delinquency Law. Because of his refusals to co-operate, *264 no determination had been made of McNeil when his term under the offense charged has expired. The Supreme Court held that McNeil must be released and could not be recommitted for mental observation on an ex parte order. Supra at 248-50. The Supreme Court equated the permissible length of a commitment for observation as a defective delinquent with the permissible length of commitment due to incompetence to stand trial. Supra at 250.
[1]
We find no factually distinguishing features between an incompetent to stand trial and an acquittee by reason of insanity, a convicted sex offender or one under observation as a mentally defective delinquent. In all cases the initial custodial warehousing of such persons in a mental facility is without due process guarantees accorded a civil committee. The inescapable conclusion must be that the expiration of the maximum penalty period under the offense charged is a critical date at which the state must make a determination as to the continued confinement of an incompetent charged with a misdemeanor or minor felony to stand trial. Further, that continued confinement can proceed only after the incompetent has been given the due process guarantees accorded civil committees. See, generally, ch. 51, Stats.
Jackson v. Indiana is also the genesis for several cases which discuss that the severity of the crime should have some relation to the period of an incompetent's commitment. In the Seventh Circuit case of Little v. Twomey, 474 F.2d 767 (7th Cir. 1973), a defendant who had regained his competency to stand trial alleged the length of his commitment as incompetent to stand trial violated his right to a speedy trial. In Little it was stated as dicta:
"In our opinion, . . . `a reasonable period of time' must be to some extent equated with the gravity of the offense involved. Here the charge was murder and *265 robbery as contrasted with petty theft." Supra at 770. See also, White v. Keller, 438 F. Supp. 110, 119 (Md. Dist. Ct. 1977).
State courts, in the absence of a statute with a maximum sentence provision,[1] have also recognized that the term of commitment should be related to the severity of the crime. State ex rel. Lockhardt v. Armistead, 351 So.2d 496, 497 (La. 1977); In re Davis, 106 Cal. Rptr. 178, 505 P.2d 1018 (1973). In particular it was stated in In re Davis, supra at 1025:
"Obviously, if the defendant is charged only with a minor misdemeanor a lengthy commitment to a state hospital normally would be unjustified."
The most definitive statement of this court in interpreting Jackson v. Indiana, supra, appears in State ex rel. Haskins v. County Court of Dodge County, 62 Wis. 2d 250, 214 N.W.2d 575 (1974). In Haskins it was stated:
"In light of Jackson, it is apparent that this legislative determination of the cut-off period for sec. 971.14(5), Stats., commitment can no longer be justified, since the term of the conviction is irrelevant to the question of whether the competency of an individual defendant to stand trial will soon be regained." Supra at 261.
Haskins mandated that an incompetent to stand trial could not be held for a competency determination in excess of eighteen months. The eighteen-month period *266 was lengthened to twenty-four months by the 1975 amendment to sec. 971.14(5), ch. 153, Laws of 1975.
The state contends that the above statement from Haskins supports the proposition that the twenty-four month legislatively created maximum period for the determination of competency to stand trial must be applied equally to all parties found incompetent to stand trial under sec. 971.14(5). The state maintains the application of this twenty-four month period is without regard to whether the party was charged with a crime carrying a maximum sentence of less than twenty-four months.
This interpretation was not intended, nor is it supported by the Haskins decision, when considered in its entirety. The state's position ignores a later passage in Haskins where it was stated:
"We are obligated to give due heed to legislative policy that the maximum period of confinement under sec. 971.14 should comport as nearly as possible with the maximum term of confinement and yet we are required to stay within constitutional limits. . . . We conclude . . . under the evidence before us and in light of the legislative policy, that the ultimate retention of a defendant under sec. 971.14, Stats. should be limited to eighteen months. . . ." State ex rel. Haskins v. County Court of Dodge County, supra at 262.
The two above quoted passages from Haskins can best be understood in light of the facts of that case. In Haskins there were several petitioners seeking release under the rationale of Jackson v. Indiana, supra. The petitioners were all charged with crimes carrying lengthy maximum sentences, but none of these petitioners had been confined in excess of their potential criminal sentences. When the court stated that the maximum sentence penalty is irrelevant to the term of an incompetent's confinement, we read this comment as only being directed to parties such as the petitioners in Haskins with longer criminal sentences. In other words, the mandated *267 maximum period for a determination of competency to stand trial could not be exceeded even if the charged offense had a maximum sentence penalty which was greater.
The converse was not intended; the state is misguided in urging that Haskins holds that the maximum sentence penalty when less than the legislative cut-off period is irrelevant to the period of confinement for a party found incompetent to stand trial. When in Haskins it was stated "that the maximum period of confinement under sec. 971.14(5) should comport as nearly as possible with the maximum term of confinement . . ." we interpret this in reference to parties, such as Deisinger, whose potential maximum sentences were less than the mandated maximum period for observation for the return to competency in the foreseeable future.
This court's interpretation of Haskins is consistent with sec. 971.14(5), Stats. (1973), as it read at the time of the decision. The statute then contained the maximum sentence penalty deleted by ch. 153, Laws of 1975. Because of the presence of the maximum sentence provision, we did not specifically address the issue of a petitioner like Deisinger whose maximum sentence penalty was less than 18 months. The absence of a discussion in Haskins as to this situation was not intended to eliminate the application of the maximum sentence provision to those incompetents whose maximum sentence terms were less than the maximum period for observation.
[2, 3]
In light of this court's interpretation of Haskins and authority interpreting Jackson v. Indiana, supra, we find that the petitioner, Andrew Deisinger, was entitled to be released on the date his confinement exceeded his potential maximum sentence penalty under the offense charged. However, we do not find sec. 971.14(5) unconstitutional. This court is obligated to *268 uphold the constitutionality of a statute whenever possible and in the past has supplied statutory deficiencies by court rule in order to save a statute. State ex rel. Chobot v. Circuit Court for Milwaukee County, 61 Wis. 2d 354, 367, 212 N.W.2d 690 (1973).[2]Huebner v. State, 33 Wis.2d 505, 147 N.W.2d 646 (1967).[3]
[4, 5]
The most basic notions of due process fairness require that one found incompetent to stand trial is entitled to release when observatory confinement reaches the length of the potential maximum sentence for the underlying criminal offense. The primary right being protected by sec. 971.14(5) is the right of a defendant to a fair trial in which he can aid in the preparation of his defense.
[6, 7]
It should be clearly recognized that incompetency to stand trial and mental illness are not interchangeable terms. State ex rel. Haskins v. County Court of Dodge County, supra at 264-65. One who is incompetent to stand trial does not possess the mental faculties necessary to aid in the preparation of a legal defense. One who is mentally ill and a potential subject for ch. 51 confinement must be proven beyond a reasonable doubt, and with the right of trial by jury, that he is dangerous to himself or society. Sec. 51.20(12) and sec. 51.20(1) (a). There is no finding as to dangerousness involved with determination of incompetence to stand trial. If under sec. 971.14(5) a party charged with a minor offense can be held beyond the maximum sentence penalty for that crime, sec. 971.14(5) is nothing more than a "mini" civil commitment. Such a commitment is without the *269 procedural safeguards of a jury trial and without a finding of dangerousness.
While the general public has a right to be safe from criminally dangerous incompetents, and while this right is of equal importance to the defendant's right to aid in his defense, the procurement of the public's right to safety should be accomplished through the more comprehensive civil commitment statutes of ch. 51 and not through sec. 971.14(5). Even though one may be unable to aid in his defense, there is no constitutional basis for confining such a person. This precept was aptly stated in O'Connor v. Donaldson, 422 U.S. 563, 95 S. Ct. 2486, 45 L. Ed.2d 396 (1975):
"A finding of `mental illness' alone cannot justify a State's locking a person up against his will and keeping him indefinitely in simple custodial confinement. Assuming that that term can be given a reasonably precise content and that the `mentally ill' can be identified with reasonable accuracy, there is still no constitutional basis for confining such persons involuntarily if they are dangerous to no one and can live safely in freedom." Supra at 575.
[8, 9]
Although a party such as Deisinger is entitled to release when his sentence term has expired, this does not preclude the state from maintaining custody and control over an allegedly dangerous individual. Ch. 51 commitment procedures may be commenced on or before the release date. If such a defendant is not adjudicated dangerous after a ch. 51 proceeding, or if no such proceedings are commenced, the defendant must be released. The inability of the state to maintain custody over this class of individuals was addressed in State ex rel. Haskins v. County Court of Dodge County, supra at 258-59.
"Eventually the time is reached when it becomes apparent that commitment can serve no purpose other than *270 the custodial warehousing of an individual who cannot appropriately be dealt with by the criminal law. If incarceration continues at a time beyond which it can be justified as being for the purpose of protecting the rights of the defendant, the incarceration is, in effect, penal in nature and cannot be justified."
[10]
While the conclusion reached calls for the defendant's release or civil commitment at the end of the maximum penalty period, this does not preclude the state from bringing the party to trial at some future date if he regains competency. The ability of the state to allow the indictment to pend while the accused is released but still awaiting competency is only limited by the defendant's right to a speedy trial. State ex rel. Porter v. Wolke, 80 Wis.2d 197, 257 N.W.2d 881 (1977); Barker v. Wingo, 407 U.S. 514, 92 S. Ct. 2182, 33 L. Ed.2d 101 (1972); Little v. Twomey, supra; United States v. Lancaster, 408 F. Supp. 225 (D.C. Dist. Ct. 1976);[4]United States v. Beidler, 417 F. Supp. 608 (Fla. M.D. Dist. Ct.). The standard for speedy trial determinations is to be applied on a case by case basis. Barker v. Wingo, supra at 528-29.
[11]
We herein find sec. 971.14(5) constitutional and hold that until such time as the legislature sees fit to expressly reinstate the maximum sentence provision in sec. *271 971.14(5), this decision shall control the period of confinement for incompetents to stand trial whose potential maximum criminal sentence is less than 24 months. In such a case the confinement for observation of competency to stand trial shall not exceed the maximum penalty under the charged offense.
The second issue raised by the petitioner involves whether he is entitled to sentence credit for the six months time spent at the Winnebago facility. At present there is no Wisconsin case giving sentence credit for time spent in a mental hospital, unlike the cases giving sentence credit to indigent defendants unable to post bail, Byrd v. State, 65 Wis.2d 415, 222 N.W.2d 696 (1974); Klimas v. State, 75 Wis.2d 244, 249 N.W.2d 285 (1977); Wilson v. State, 82 Wis.2d 657, 264 N.W.2d 234 (1978), or where a parole violator is incarcerated and there is an unreasonable delay in scheduling a parole revocation hearing. State ex rel. Solie v. Schmidt, 73 Wis.2d 76, 242 N.W.2d 244 (1976). We do not reach this issue.
[12]
The petitioner is not yet sentenced nor is it ascertainable if he ever will be brought to trial much less convicted and sentenced; he may be acquitted if brought to trial, or he may be civilly committed. Judicial restraint dictates not passing on the issue until the facts of the proper case present a justiciable controversy. Tooley v. O'Connell, 77 Wis.2d 422, 434, 253 N.W.2d 335 (1977); Skowron v. Skowron, 259 Wis. 17, 19, 47 N.W.2d 326 (1951); State ex rel. LaFollette v. Dammann, 220 Wis. 17, 22, 264 N.W. 627 (1936); Heller v. Shapiro, 208 Wis. 310, 313, 314, 242 N.W. 174 (1932).
By the Court.Order affirmed.
NOTES
[1]  States having a maximum sentence provision: Michigan, 330.2034, Stats.either 1/3 the maximum sentence or 15 months, whichever is lesser; Conn. sec. 54-40(d) C. G. S. (1969)maximum sentence or 18 months; Rhode Island, 26-4-3, G. L. R. I. (1973) 2/3 of the maximum sentence or as long as there is a reasonable likelihood of a return to competency in the foreseeable future; Oregon, 161.370, O. R. St. (1975)maximum term or no longer than 5 years; Note: New York limits pretrial commitment to 90 days for misdemeanants, 730.50(1), C. P. Law (1971).
[2]  The court supplied a definition of "obscenity" absent from sec. 944.21(1) (a), Stats. (1973).
[3]  The court granted a judicial hearing in sex deviate proceedings where the statute had not provided.
[4]  "No public interest would be served by dismissing the indictment in this case where the defendant stands charged with felony murder, committed under most aggravated circumstances just four years ago. Psychiatry is an inexact science as any qualified psychiatrist will readily admit. There remains the possibility, remote as it seems at the moment, that this defendant may regain his mental capacity to stand trial. This court is aware of many criminal cases where defendants have made seemingly miraculous recoveries after pending criminal charges have been dropped or there has been an acquittal by reason of insanity." Supra at 229.
