
136 Cal.App.3d 850 (1982)
186 Cal. Rptr. 560
FRED RAY STICKEL, Petitioner,
v.
THE SUPERIOR COURT OF SISKIYOU COUNTY, Respondent; THE PEOPLE, Real Party in Interest.
Docket No. 21559.
Court of Appeals of California, Third District.
October 22, 1982.
*852 COUNSEL
Nicholas C. Holt, Quin Denvir, State Public Defender, and Mark E. Cutler, Chief Assistant State Public Defender, for Petitioner.
No appearance for Respondent.
Steven B. Plumer, District Attorney, for Real Party in Interest.
*853 OPINION
SPARKS, J.
We are called upon to decide whether a defendant who committed a crime before the repeal of the mentally disordered sex offender (MDSO) statutes may be denied the benefits of the repealed law without infringing the constitutional proscription against ex post facto legislation. We hold that such a denial does not violate that proscription.
In 1981 petitioner Fred Ray Stickel committed a lewd and lascivious act upon the person of a child under the age of 14 years in violation of Penal Code section 288, subdivision (a). A complaint was filed against petitioner in January 1982 and in February 1982 he pled guilty before the magistrate. (Pen. Code, § 859a, subd. (a).) The matter was certified to the superior court where petitioner moved for consideration of his status as a mentally disordered sex offender under former Welfare and Institutions Code section 6300 et seq. The superior court determined that the repeal of the MDSO laws effective January 1, 1982, precluded consideration of petitioner as a MDSO. The court referred petitioner to the probation office for a presentence report. We issued an alternative writ of mandate and stayed further proceedings in the trial court in order to consider whether the repeal of the MDSO laws applies to a person who committed his crime before the effective date of the repeal.

I
The provisions of the MDSO laws were contained in former Welfare and Institutions Code sections 6300 through 6330. Essentially those provisions were intended to protect society against the activities of sexually disturbed offenders by confining and treating them in a state hospital. (People v. Resendez (1968) 260 Cal. App.2d 1, 12 [66 Cal. Rptr. 818].) As the Supreme Court explained in People v. Feagley (1975) 14 Cal.3d 338, 359 [121 Cal. Rptr. 509, 535 P.2d 373], "[n]ot only is medical treatment the raison d'etre of the mentally disordered sex offender law, it is its sole constitutional justification." These commitment proceedings have been said to be civil proceedings of a special nature, collateral to the criminal prosecution. (See e.g., Gross v. Superior Court (1954) 42 Cal.2d 816, 820 [270 P.2d 1025]; see also 2 Witkin, Cal. Procedure (2d ed. 1970) Actions, § 30, pp. 905-906.) It has consequently been held that MDSO proceedings were neither intended as punishment for crime, nor as a substitute for punishment. (People v. Rancier (1966) 240 Cal. App.2d 579, 585 [49 Cal. Rptr. 876]; People v. Schaletzke (1966) 239 Cal. App.2d 881, *854 885 [49 Cal. Rptr. 275].) As an alternative to immediate imprisonment, the MDSO law provided for hospital confinement where an offender could both obtain treatment and a credit for the period of such commitment against any subsequent criminal punishment. (Former Welf. & Inst. Code, § 6325.)[1]
In Statutes of 1981, chapter 928, section 2, the Legislature repealed the MDSO provisions of the Welfare and Institutions Code, effective January 1, 1982. In sections 3 and 4 of that chapter the Legislature made certain declarations of its intent. Section 3 provides: "Nothing in this act shall be construed to affect any person under commitment under Article 1 (commencing with Section 6300) of Chapter 2 of Part 2 of Division 6 of the Welfare and Institutions Code prior to the effective date of this act. It is the Legislature's intent that persons committed as mentally disordered sex offenders and persons whose terms of commitment are extended under the provisions of Section 6316 of the Welfare and Institutions Code shall remain under these provisions until the commitments are terminated and the persons are returned to the court for resumption of the criminal proceedings.
"The Legislature finds and declares that the purposes of the mentally disordered sex offender commitment have been to provide adequate treatment of these offenders, adequate controls over these persons by isolating them from a free society, and to protect the public from repeated commission of sex crimes. In making the repeal of the mentally disordered sex offender commitment procedures prospective only, the Legislature finds and declares that it is necessary to retain persons under this commitment who committed their crimes before the effective date of this enactment in order to have proper control over these persons and to protect society against repeated commission of sex crimes and that other enactments in the 1979-80 Regular Session of the Legislature and the 1981-82 Regular Session of the Legislature would yield prison terms which would provide this protection to society without the need to retain the mentally disordered sex offender commitment."
Section 4 provides: "In repealing the mentally disordered sex offender commitment, the Legislature recognizes and declares that the commission of sex offenses is not in itself the product of mental diseases. It is the intent of the Legislature that persons convicted of a sex offense after the effective *855 date of this section, who are believed to have a serious, substantial, and treatable mental illness, shall be transferred to a state hospital for treatment under the provisions of Section 2684 of the Penal Code."
In the same chapter the Legislature amended the Penal Code by adding sections 1364 and 1365. These sections provide for voluntary treatment of persons convicted of certain sex crimes after a prison commitment.[2]
(1) (See fn. 3.) Petitioner asserts, predictably, that he is entitled under ex post facto principles to be treated under the former MDSO laws because *856 he committed his crime prior to the effective date of the repeal of those laws.[3]

II
Article I, section 10, clause 1 of the Constitution of the United States provides: "No state shall ... pass any ... ex post facto law...." Article I, section 9, of the Constitution of California similarly provides: "A bill of attainder, ex post facto law, or law impairing the obligation of contracts may not be passed."
(2) In the first case construing the federal ex post facto clause the United States Supreme Court categorized four classes of laws embraced by that clause: "1st. Every law that makes an action done before the passing of the law; and which was innocent when done, criminal; and punishes such action. 2d. Every law that aggravates a crime, or makes it greater than it was, when committed. 3d. Every law that changes the punishment, and inflicts a greater punishment, than the law annexed to the crime, when committed. 4th. Every law that alters the legal rules of evidence, and receives less, or different, testimony, than the law required at the time of the commission of the offense, in order to convict the offender." (Calder v. Bull (1798) 3 U.S. (3 Dall.) 386, 390 [1 L.Ed. 648, 650].) That classification remains definitive today, 184 years later. (See People v. Superior Court (Willis) (1982) 135 Cal. App.3d 1052 [185 Cal. Rptr. 822]; People v. Sobiek (1973) 30 Cal. App.3d 458, 472 [106 Cal. Rptr. 519, 82 A.L.R.3d 804].)
*857 As the United States Supreme Court recently explained in Weaver v. Graham, supra, 450 U.S. 24, through this prohibition against ex post facto laws, "the Framers sought to assure that legislative Acts give fair warning to their effect and permit individuals to rely on their meaning until explicitly changed.... The ban also restricts governmental power by restraining arbitrary and potentially vindictive legislation.... [¶] In accord with these purposes, our decisions prescribe that two critical elements must be present for a criminal or penal law to be ex post facto: it must be retrospective, that is, it must apply to events occurring before its enactment, and it must disadvantage the offender affected by it." (Id., at pp. 28-29 [67 L.Ed.2d at p. 23], citations and fns. omitted.)
(3) The California Supreme Court has formulated a similar standard. The ex post facto clauses of federal and state Constitutions, that court held, "... prohibit retrospective laws that (1) impose criminal liability for conduct innocent when it occurred, (2) increase the punishment prescribed for a crime at the time it was committed, or (3) by necessary operation and `"in [their] relation to the offense, or [their] consequences, alter the situation of the accused to his disadvantage...."'" (Conservatorship of Hofferber (1980) 28 Cal.3d 161, 180 [167 Cal. Rptr. 854, 616 P.2d 836].)
(4) We examine the repeal of the MDSO laws in light of these principles. Obviously the repealer did not impose criminal liability for conduct innocent when done. Lewd conduct with a child was criminal when petitioner acted in 1981 and remains so today. (Pen. Code, § 288, subd. (a).) Just as plainly the repeal did not increase or change the punishment for the commission of that crime in 1981. It was punishable by imprisonment in the state prison for a term of three, five or seven years and that punishment was not altered by the repeal of the MDSO statutes.[4] It remains only to be determined whether the repeal somehow "disadvantaged" petitioner as an accused. "That branch of ex post facto doctrine," the California Supreme Court explained in Hofferber, "relates to circumstances under which a criminal defendant is forced to defend against a *858 verdict of criminal guilt." (28 Cal.3d at p. 182.) Since the MDSO procedure did not even come into play until "a person is convicted of a sex offense" (former Welf. & Inst. Code, § 6302), it is self-evident that the repeal of this procedure could not disadvantage petitioner in the determination of his criminal guilt. In short, the MDSO statutes did not involve a criminal adjudication and their repeal, by definition, could not constitute an ex post facto violation. This conclusion was foreshadowed by Hofferber. There defendant was charged with murder. After he was found mentally incompetent to stand trial (Pen. Code, § 1368 et seq.), the Legislature amended the statutes governing the confinement of incompetent criminal defendants and exposed him to possible indefinite confinement for dangerousness. Defendant argued that the application of the amendments to the prior homicide violated the constitutional limitation on ex post facto laws. Rejecting that contention, the court held that the amendments "have nothing to do with any punitive disability attached to the homicide charged against appellant at the time it occurred. They did not alter or affect the sentence for that crime. They did not extend, directly or indirectly, any incarceration that had been or could be imposed on appellant for criminal conduct." (28 Cal.3d at p. 181.) Concluding that the amendments were "not penal for [the] purposes of the ex post facto clauses," the court stated that "no criminal adjudication is involved, and we find no ex post facto violation." (Id., at p. 182.) For the same reasons we also find no ex post facto violation here.

III
Having disposed of the constitutional question, we next consider whether the Legislature intended the repealing act to apply to offenders in petitioner's position. The People[5] contend that the Legislature intended to preserve the MDSO laws only to those persons actually committed before the effective date of the repeal of the MDSO laws, regardless of the date of the commission of their offenses. We agree.
It is clear that the Legislature intended to preserve the MDSO program for those defendants committed under its provisions prior to January 1, 1982. In section 3 of chapter 928 of the Statutes of 1981, the Legislature, as we have noted, expressly stated that the repeal of the MDSO laws would *859 not apply to persons "under commitment ... prior to the effective date of this act." Petitioner was not "under commitment" prior to that time. It is equally clear that the Legislature intended to abolish the program as to those persons who commit crimes subsequent to January 1, 1982. Petitioner committed his crime prior to the effective date of the repeal of the MDSO provisions, but was not convicted until after the repeal became effective. The declared legislative intent concerning that situation is, admittedly, less clear. The Legislature explicitly declared that the repeal was to be "prospective only." The question is whether that language refers to prospective crimes or to prospective convictions. (5) We conclude it refers to convictions and that the Legislature intended to abolish the initiation of all MDSO proceedings after January 1, 1982.[6]
We have already noted that Penal Code section 1364 was enacted by the same bill which repealed the MDSO statutes. That section commands in relevant part that "Notwithstanding any other provision of law, when any person is convicted of a sex offense against a person under the age of 14 years ... there shall be no hearing to determine whether the person is a mentally disordered sex offender." (Italics added.) The controlling date under this statute is the time of conviction.
The date of the commission of the crime, it must be recalled, is irrelevant to MDSO proceedings. The existence of an offender's status as a MDSO is determined, not at the time of the commission of the crime, but rather at a hearing after his conviction. (Former Welf. & Inst. Code, §§ 6302, 6316.) If the offender's mental status at that post conviction hearing is such that he is not presently a "person who by reason of mental defect, disease, or disorder, is predisposed to the commission of sexual offenses to such a degree that he is dangerous to the health and safety of others" (Welf. & Inst. Code, § 6300), the superior court could not commit him; instead the court was statutorily required to return the offender to the criminal court for sentencing. (Welf. & Inst. Code, § 6315.) Hence a sex offender who was a MDSO at the time of his crime but who recovered before his conviction could not be committed; conversely, an offender who was not a *860 MDSO when he committed the crime but who has since mentally degenerated into one by the time of his conviction was committable. What is critical is that the MDSO determination must be made on the basis of the defendant's condition at the time of the MDSO hearing. The commission of an offense is merely a precondition for invocation of the MDSO proceeding. It would, therefore, be unreasonable to construe the prospective language of the new law as referring to the immaterial time of the commission of the crime rather than the crucial date of the commitment hearing.[7] We are required to "indulge in a presumption that ... legislative provisions was not intended to produce unreasonable results." (Barber v. Blue (1966) 65 Cal.2d 185, 188 [52 Cal. Rptr. 865, 417 P.2d 401].) Since petitioner was not convicted until February 1982 the prospective repeal of MDSO commitments, effective January 1st, applied to his case.
The petition for writ of mandate is denied. The stay previously issued is vacated and the alternative writ discharged.
Blease, Acting P.J., and Carr, J., concurred.
A petition for a rehearing was denied November 17, 1982, and petitioner's application for a hearing by the Supreme Court was denied January 5, 1983. Mosk, J., was of the opinion that the application should be granted.
NOTES
[1]  In People v. Sage (1980) 26 Cal.3d 498 [165 Cal. Rptr. 280, 611 P.2d 874], the Supreme Court ruled, however, that a defendant was not entitled to conduct credit under Penal Code section 4019 for the period of hospital confinement for treatment as a MDSO.
[2]  Penal Code section 1364 provides: "Notwithstanding any other provision of law, when any person is convicted of a sex offense against a person under the age of 14 years or of a sex offense accomplished against the victim's will by means of force, violence, duress, menace, or fear of immediate and unlawful bodily injury on the victim or another person there shall be no hearing to determine whether the person is a mentally disordered sex offender.

"The court after imposing sentence for such a conviction shall order the delivery of the convicted person to the Department of Corrections. The Department of Corrections shall inform such convicted persons of the state hospital program established pursuant to this section.
"If the convicted person has no more than two prior felony convictions for a non-sex crime, consents to evaluation, and has a sentence of three or more years, the Department of Corrections at the beginning of the third year prior to release shall transfer the person to an appropriate state hospital for an evaluation of up to thirty (30) days duration. At any time, during the thirty (30) day evaluation the director of the state hospital shall provide a diagnostic report to the Director of Corrections with a recommendation for or against placement of the person in a treatment program.
"The Director of Corrections shall, if he or she receives a recommendation for such treatment, and with the consent of the convicted person, transfer the person to an appropriate state hospital designated by the Director of Mental Health for treatment. In no event shall the person be placed on outpatient status pursuant to such treatment. In no event shall the person be released prior to his or her determinate sentence date, nor shall treatment pursuant to this section exceed the term of imprisonment imposed. The Director of Mental Health shall make a recommendation prior to the person's release date whether the person should receive outpatient treatment as a condition of parole. If outpatient treatment is provided in a county Short-Doyle Program, then treatment shall be funded as provided in Section 5710.1 of the Welfare and Institutions Code.
"If the person refuses to cooperate in his or her treatment while in the state hospital, or is found unamenable to treatment, or if the person requests a return to the Department of Corrections, the Director of the state hospital shall cause the person to be returned to the Department of Corrections.
"Physical transfer of the inmate from the Department of Corrections to the state hospital and return shall be the responsibility of the Department of Corrections.
"If the recommendation is against placement of the person in a treatment program, the person shall be returned to the Department of Corrections for incarceration for the remainder of his or her term of imprisonment.
"All days of confinement in a state hospital for testing and treatment shall be credited to the person's term of imprisonment and the provisions of Section 2931 shall apply."
Penal Code section 1365 reads: "It is the intent of the Legislature that persons committing sex offenses specified in Section 1364 have the opportunity during their time of incarceration to participate voluntarily in a state hospital program. The program shall be established according to a valid experimental design in order that the most effective, newest, and promising methods of treatment of sex offenders may be rigorously tested. The program established pursuant to Section 1364 shall terminate January 1, 1991."
[3]  Petitioner claims that he is being deprived of a "right" available to him at the time the crime was committed. It is clear that a sex offender did not have a right to be treated as a MDSO under the repealed law. As the Court of Appeal noted in People v. Preciado (1981) 116 Cal. App.3d 409, 411-412 [172 Cal. Rptr. 107], "[e]ven though the court determined [defendant] was a MDSO who could benefit from treatment, he had no `right' to treatment in a state hospital, and the court could ... return him to the criminal court for sentencing. [Citation.]" But as the United States Supreme Court explained in Weaver v. Graham (1981) 450 U.S. 24 [67 L.Ed.2d 17, 101 S.Ct. 960], "... a law need not impair a `vested right' to violate the ex post facto prohibition. Evaluating whether a right has vested is important for claims under the Contracts or Due Process Clause, which solely protect pre-existing entitlements.... The presence or absence of an affirmative, enforceable right is not relevant, however, to the ex post facto prohibition, which forbids the imposition of punishment more severe than the punishment assigned by law when the act to be punished occurred. Critical to relief under the Ex Post Facto Clause is not an individual's right to less punishment, but the lack of fair notice and governmental restraint when the legislature increases punishment beyond what was prescribed when the crime was consummated. Thus, even if a statute merely alters penal provisions accorded by the grace of the legislature, it violates the Clause if it is both retrospective and more onerous than the law in effect on the date of the offense." (Id., at pp. 29-31 [67 L.Ed.2d at pp. 23-24], fns. omitted.)
[4]  It is true that under the repealed law a MDSO was confined in a state hospital. But that confinement for treatment of a present mental condition did not constitute punishment for a past criminal offense. "While judicial attention to the MDSO is invoked by his commission of a criminal act, the entire statutory scheme providing for the diversion of MDSOs from the mainstream of the criminal justice system clearly indicates that `in MDSO cases, subsequent confinement of the ... person is for purposes of treatment, not punishment." (In re Moye, supra, 22 Cal.3d 457 at p. 466 [149 Cal. Rptr. 491, 584 P.2d 1097], italics in original; see also In re Bevill (1968) 68 Cal.2d 854, 858 [69 Cal. Rptr. 599, 422 P.2d 679] [confinement is not for the criminal offense but because of status as an MDSO]; People v. Rancier (1966) 240 Cal. App.2d 579, 585 [49 Cal. Rptr. 876] [same]; People v. Schaletzke (1966) 239 Cal. App.2d 881, 887 [49 Cal. Rptr. 275] [MDSO commitment not a substitute for punishment].)" (People v. Saffell (1979) 25 Cal.3d 223, 229 [157 Cal. Rptr. 897, 599 P.2d 92].)
[5]  The District Attorney of Siskiyou County has been substituted for the Attorney General as counsel for the People as real party in interest in this proceeding. In a letter to this court the Attorney General explained that he has determined that the Legislature did not intend to abolish the MDSO laws as to persons who committed crimes prior to the effective date of the repeal of those laws, regardless of their conviction and commitment dates, and had so been advising his clients. Accordingly, he believed it to be inappropriate to represent the People in this proceeding.
[6]  The same conclusion was reached by the Court of Appeal for the Second District in dictum in People v. Superior Court (Martin) (1982) 132 Cal. App.3d 658 [183 Cal. Rptr. 563]. There the court observed: "Although the question has not been raised in these proceedings, for the guidance of the trial court, we think it appropriate to point out that the critical event in applying the new statute (Pen. Code, § 1364) is conviction rather than commission of the offense. [¶] Penal Code section 1364 provides in effect that persons who are convicted of the prescribed offense after the effective date of the statute shall not be subject to an MDSO commitment but shall instead be committed to the Department of Corrections. [¶] By the same token, the legislation providing for prospective only repeal of the MDSO procedure speaks in terms of retaining persons under previously ordered commitments." (Id., at pp. 663-664; italics in original.)
[7]  At the June 1982 primary election the voters adopted an initiative measure designated on the ballot as Proposition 8 and entitled "The Victims' Bill of Rights." Section 9 of that measure provides: "Sec. 9. Mentally Disordered Sex Offenders. Section 6331 is added to the Welfare and Institutions Code, to read:

"6331. This article shall become inoperative the day after the election at which the electors adopt this section, except that the article shall continue to apply in all respects to those already committed under its provisions.
"The provisions of this section shall not be amended by the Legislature except by statute passed in each house by rollcall vote entered in the journal, two-thirds of the membership concurring, or by a statute that becomes effective only when approved by the electors."
By the terms of the new section the MDSO laws became "inoperative" on June 9, 1982, to all offenders except "those already committed." On June 9th, petitioner, of course, was not already committed. To the extent that 1981 legislative repeal of the MDSO statutes did not apply to crimes committed before January 1, 1982, this new section, if validly enacted, would be controlling. However, because we conclude that the Legislature intended to abolish all new MDSO commitment proceedings after January 1, 1982, we need not determine whether section 9 of that initiative was adopted in a procedurally correct manner and is itself operative. (See Brosnahan v. Brown (1982) 32 Cal.3d 236, 253-254 [186 Cal. Rptr. 30, 651 P.2d 274].)
