
68 Cal.Rptr.3d 625 (2007)
157 Cal.App.4th 393
The PEOPLE, Plaintiff and Respondent,
v.
Roy COBB, Jr., Defendant and Appellant.
No. E040848.
Court of Appeal of California, Fourth District, Division Two.
November 28, 2007.
*626 Barbara A. Smith, under appointment by the Court of Appeal, for Defendant and Appellant.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Gary W. Schons, Senior Assistant Attorney General, Sharon L. Rhodes, Bradley A. Weinreb, and Robin Derman, Deputy Attorneys General, for Plaintiff and Respondent.
Certified for Partial Publication.[*]

OPINION
RICHLI, J.
Defendant Roy Cobb, Jr., appeals from an order committing him to a state hospital as a mentally disordered offender (MDO). He contends that his right to due process was violated because the trial on the commitment petition did not begin until after he was due to be released. We will hold that this did not violate due process because defendant had already had notice and an opportunity to be heard when he was initially found to be an MDO and therefore also found to be subject to treatment as a condition of parole under Penal Code section 2962. In the unpublished portion of this opinion, we will conclude that defendant's other contentions are moot.

I

FACTUAL AND PROCEDURAL BACKGROUND
On March 6, 2006, the prosecution filed a petition to commit defendant pursuant to the Mentally Disordered Offenders Act (MDO Act) (Pen.Code, § 2960 et seq.). Defendant was at Atascadero State Hospital, undergoing inpatient treatment as a condition of parole (Pen.Code, § 2962) following a conviction of aggravated assault. (Pen.Code, § 245, subd. (a)(1).) His scheduled release date was May 27, 2006. The trial court set a trial date of April 24, 2006.
On April 24, however, the prosecution requested a continuance because the assigned prosecutor was "out of town and unavailable." Over defense counsel's objection, *627 the trial court continued the trial to May 2.
On May 2, over defense counsel's objection, the trial court ordered the case to trail another trial that was then in progress before it.
On May 4, the prosecution requested a continuance, on the ground that its expert witness (Dr. Rosten) would be unavailable until June 9. Defense counsel objected and moved to dismiss. The trial court, noting that it had one trial currently in progress and that, after that, it had to try "a priority criminal case," denied the motion to dismiss and granted the continuance.
On May 23, defendant filed a written motion for his unconditional release, arguing that the trial court had no jurisdiction to keep him in custody without trial beyond his scheduled release date or, alternatively, for his release on bail. On May 26, the trial court denied the motion.
On June 9, the prosecution moved for a continuance, on the grounds that the assigned prosecutor was in another trial and that Dr. Rosten was unavailable because she was subject to subpoenas in other cases. Defense counsel objected and moved to dismiss, noting that defendant's release date had already passed. The trial court denied the motion to dismiss and granted a continuance to June 15.
On June 15, the trial judge, although present, was sick and about to leave to see a doctor. On the court's own motion, it granted a continuance to June 19. Defense counsel objected; she was solicitous of the trial judge's "medical emergency," but she requested assignment to another trial department "forthwith," and when that request was denied, she moved to dismiss. The trial court denied the motion.
On June 19, defense counsel moved to dismiss, on the ground that defendant had not been brought to trial in a timely manner. The trial court denied the motion. At that point, motions in limine were heard; later that day, jury selection began.
On June 22, the jury found that defendant was an MDO. The trial court ordered him committed to a state hospital for one year, calculated from the end of his previous commitment.

II[**]

III
THERE IS NO DUE PROCESS RIGHT TO HAVE THE TRIAL ON AN MDO PETITION HELD BEFORE THE DEFENDANT'S RELEASE DATE
Because an MDO proceeding is civil rather than criminal (People v. Beeson (2002) 99 Cal.App.4th 1393, 1403-1407, 122 Cal.Rptr.2d 384 [Fourth Dist., Div. Two]), the defendant does not have a constitutional right to a speedy trial, as such. The defendant does, however, have a constitutional right to due process, which can be violated by excessive delay. "`[R]egardless of whether defendant's claim is based on a due process analysis or a right to a speedy trial not defined by statute, the test is the same, i.e., any prejudice to the defendant resulting from the delay must be weighed against justification for the delay.' [Citation.]" (People v. Allen (2007) 42 Cal.4th 91, 105, 64 Cal.Rptr.3d 124, 164 P.3d 557, quoting Scherling v. Superior Court (1978) 22 Cal.3d 493, 505, 149 Cal.Rptr. 597, 585 P.2d 219.) "Except where there has been an extended delay, prejudice will not be presumed, and it will be incumbent upon the defendant to demonstrate actual prejudice. [Citations.] If *628 the defendant fails to demonstrate prejudice, the court need not consider the reasons for the delay. [Citations.]" (People v. Fernandez, supra, 70 Cal.App.4th at p. 131, 82 Cal.Rptr.2d 469.)
The defendant in an MDO proceeding also has a statutory right to a speedy trial. Penal Code section 2972, subdivision (a) provides: "The trial shall commence no later than 30 calendar days prior to the time the person would otherwise have been released, unless the time is waived by the person or unless good cause is shown." However, "th[is] 30-day trial deadline ... 'is directory and not mandatory,' and `is primarily designed to serve the interests of the public, rather than the MDO, by providing reasonable assurance that an MDO ... will not be released unless and until a determination is made that he or she does not pose a substantial danger to others.' [Citation.] A trial commenced less than 30 days before an MDO's scheduled release date is not automatically invalid, nor does the trial court lose jurisdiction if trial commences after the deadline has passed. [Citation.]" (People v. Noble (2002) 100 Cal.App.4th 184, 188, 121 Cal. Rptr.2d 918, quoting People v. Williams, supra, 77 Cal.App.4th at p. 451, 92 Cal. Rptr.2d 1; see also People v. Allen, supra, 42 Cal.4th at p. 104, 64 Cal.Rptr.3d 124, 164 P.3d 557.)[1]
Defendant does not appear to argue that the continuances of the trial prejudiced him. On this record, they did not. Indeed, he seems to be arguing that he did not have enough time before trial. On the first day of trial, his counsel objected that she had not yet received defendant's medical records from Atascadero State Hospital, which her expert would need to review. She also objected that she still had not received discovery relating to the qualifications of the prosecution expert. However, she refused to request a continuance. Defendant concludes that he had "the worst of both worlds"both a delayed trial and insufficient preparation time. He complains that he should not have been forced "to choose between serving time beyond his discharge date or preparing too hastily for trial." In People v. Frye (1998) 18 Cal.4th 894, 77 Cal.Rptr.2d 25, 959 P.2d 183, however, our Supreme Court held "that the inherent tension between the right to a speedy trial and the right to competent, adequately prepared counsel is not, in itself, an impermissible infringement on the rights of the accused, including the right to a fair trial." (Id, at p. 939, 77 Cal.Rptr.2d 25, 959 P.2d 183.) "Some rights are mutually exclusive ..., and hard choices are not unconstitutional." (Id. at p. 940, 77 Cal.Rptr.2d 25, 959 P.2d 183.)
Defendant does seem to be arguing that at least some of the continuances were granted without good cause. However, the very fact that Penal Code section 2972, subdivision (a) is directory rather than mandatory means that this would not be reversible error in the absence of prejudice (Cal. Const., art. VI, § 13; see People v. Williams, supra, 77 Cal.App.4th at pp. 446-447, 92 Cal.Rptr.2d 1), which, as we just noted, defendant has not shown.
Defendant's central argument is that, as a matter of federal due process, an MDO trial must both begin and end before the defendant's release date. He relies on Zachary v. Superior Court (1997) 57 Cal. App.4th 1026, 67 Cal.Rptr.2d 532, in which the prosecution did not even file a recommitment petition until after the defendant's most recent commitment had already *629 expired. (Id. at p. 1030, 67 Cal. Rptr.2d 532.) The court held that the MDO Act, "[v]iew[ed] ... as a whole," required that the trial be completed before the end of the defendant's release date. (Zachary, at pp. 1031-1032, 67 Cal.Rptr.2d 532.) Curiously, however, it then declined to decide the state-law question of whether this requirement was jurisdictional. (Id. at pp. 1036-1037, 67 Cal.Rptr.2d 532.) Instead, it held that the delay violated the federal right to due process. (Id. at pp. 1032-1036, 67 Cal.Rptr.2d 532.) It reasoned, in part, that "procedural due process requires a hearing before a state acts to commit a person involuntarily to a mental hospital for an extended period." (Id at p. 1033, 67 Cal.Rptr.2d 532.) It concluded that this right had been violated because the defendant had been confined without a hearing. (Id. at p. 1036, 67 Cal.Rptr.2d 532.)[2]
In People v. Williams, supra, 77 Cal. App.4th 436, 92 Cal.Rptr.2d 1, however, the court held that an MDO trial does not have to be completed before the defendant's release date. (Id. at pp. 452-159, 92 Cal.Rptr.2d 1.) It rejected the defendant's reliance on Zachary, for several reasons. Preliminarily, it agreed with the result in Zachary, while questioning Zachary's use of "a constitutional analysis to reach its conclusion." (Williams, at p. 455, 92 Cal. Rptr.2d 1.) It noted that, in Zachary, the petition was not even been filed until after the defendant's release date; it therefore violated Penal Code section 2972, subdivision (e), which requires that a recommitment petition be filed before the release date. (Williams, at pp. 455-456, 92 Cal. Rptr.2d 1.) Williams found nothing in the MDO statutes, however, to suggest that the Legislature intended the trial to be completed before the release date. (Id. at p. 456, 92 Cal.Rptr.2d 1; see also id. at pp. 452-54, 92 Cal.Rptr.2d 1.)
The court plainly was troubled by the constitutional due process issue. It admitted that "to maintain custody after a release date and pending a final determination on a petition obviously interferes with an MDO's liberty interests." (People v. Williams, supra, 77 Cal.App.4th at p. 456, 92 Cal.Rptr.2d 1.) It added that "the state may restrain a person if it adequately protects against the mistaken or unjustified interference with liberty," but that "[t]his ordinarily means some sort of notice and a hearing before the interest is affected. [Citations.]" (Id. at pp. 456-457, 92 Cal. Rptr.2d 1.)
Williams concluded, however, that a defendant's constitutional rights could be protected even in the absence of a jurisdictional requirement that the trial end before the release date. "For example, if ... it became clear that it was impossible to complete trial before a release date and the defendant did not waive time, we believe the trial court could provide adequate time to prepare for trial and properly maintain the custodial status quo pending the trial ... [i]f, at the hearing to determine good cause to excuse noncompliance with the 30-day requirement, the parties addressed and the court determined whether there was probable cause to believe the MDO, as a result of a mental disorder, posed a danger to others if released on schedule and before a final determination of the petition. [Citations.] In this way, the court could retain the flexibility to accommodate unforeseen circumstances, *630 achieve the purposes of the [MDO Act], and also protect a defendant's rights to liberty and procedural due process. A jurisdictional deadline, on the other hand, would blindly protect liberty interests, possibly at the expense of public safety." (People v. Williams, supra, 77 Cal.App.4th at p. 457, 92 Cal.Rptr.2d 1, fn. omitted.) In a footnote, it cautioned: "We do not construe the [MDO Act] to require such a determination. Rather, our example is intended only to explain why we do not find a jurisdictional deadline necessary to protect an MDO's interests in liberty and procedural due process." (Id. at p. 457, fn. 9, 92 Cal.Rptr.2d 1.)
We agree with the holding in Williams, although for somewhat different reasons, and we disagree with Zachary. As both courts concurred, ordinarily "the Constitution requires some kind of a hearing before the State deprives a person of liberty or property. [Citations.]" (Zinermon v. Burch (1990) 494 U.S. 113, 127 [110 S.Ct. 975, 108 L.Ed.2d 100].) The state cannot so much as suspend a high school student from school without notice and a hearing in advance, if possible, but in any event, as soon as practicable. (Goss v. Lopez (1975) 419 U.S. 565, 581-583 [95 S.Ct. 729, 42 L.Ed.2d 725].)
It is generally considered that, in an ordinary criminal case, the preliminary hearing serves this function, allowing the defendant's continued detention until trial. (See Gerstein v. Pugh (1975) 420 U.S. 103, 114-115 [95 S.Ct. 854, 43 L.Ed.2d 54] ["the Fourth Amendment requires a judicial determination of probable cause as a prerequisite to extended restraint of liberty following arrest"]; see also id. at pp. 119 125, 95 S.Ct. 854 [discussing what procedural due process requires in connection with this judicial determination], Hewitt v. Helms (1983) 459 U.S. 460, 475 [103 S.Ct. 864, 74 L.Ed.2d 675] ["[w]hile Gerstein was grounded in the Fourth Amendment, we think it provides a useful point of departure with respect to the due process question raised here"].) Similarly, a parolee who is arrested for an alleged parole violation is constitutionally entitled to a prompt "`preliminary hearing' to determine whether there is probable cause or reasonable ground to believe that the arrested parolee has committed acts' that would constitute a violation of parole conditions. [Citation.]" (Morrissey v. Brewer (1972) 408 U.S. 471, 485, 92 S.Ct, 2593, 33 L.Ed.2d 484.)
Upon the filing of a sexually violent predator (SVP) petition, the defendant is statutorily entitled to a prompt probable cause hearing. (Welf. & Inst.Code, § 6602.) The MDO Act, unlike the SVP statutes, does not provide for a probable cause hearing. That is why Williams suggested that, in a proper case, the trial court might have to hold a probable cause hearing (in fact, if not in name) before it could find that the prosecution had shown good cause for a continuance of the trial beyond the defendant's release date.
However, there is a very good reason why the MDO statutes differ from the SVP statutes in this respect. An SVP is committed at the end of the term of his[3] imprisonment for the underlying offense. (Welf. & Inst.Code, § 6601, subd. (a)(2).) Thus, there has been no previous determination that he is, in fact, an SVPi.e., that, besides having a qualifying criminal conviction, he has a diagnosed mental disorder that makes him likely to engage in sexually violent criminal behavior. (See Welf. & Inst.Code, §§ 6600, subd. (a)(1), 6602, 6604.)
By contrast, an MDO cannot be committed under Penal Code section 2972 unless *631 he or she has first been made subject to treatment as a condition of parole. (Pen. Code, §§ 2962, 2970.) This, in turn, requires three psychologists or psychiatrists to concur (Pen.Code, § 2962, subd. (d)) "that the prisoner has a severe mental disorder, that the disorder is not in remission, or cannot be kept in remission without treatment, that the severe mental disorder was one of the causes or was an aggravating factor in the prisoner's criminal behavior, that the prisoner has been in treatment for the severe mental disorder for 90 days or more within the year prior to his or her parole release day, and that by reason of his or her severe mental disorder the prisoner represents a substantial danger of physical harm to others." (Id., subd. (d)(1)). If the defendant disagrees, he or she can request a hearing before the Board of Prison Terms (Pen. Code, § 2966, subd. (a)); then, if the defendant disagrees with the board, he or she can request a hearing in superior court, in which he or she has the right to a jury trial and in which the standard of proof is beyond a reasonable doubt. (Id., subd. (b)).
This notice and opportunity to be heard is also constitutionally sufficient to allow the defendant to be confinedeven after his or her release dateuntil the end of trial. Essentially, there has already been a determination that the defendant is an MDO; at the trial, the prosecution simply must prove that the defendant is still an MDO.[4] Moreover, before the prosecution can file the petition, the head of the program that is providing the defendant with treatment must certify that the defendant is not in remission or cannot be kept in remission without treatmenti.e., that he or she is still an MDO. (Pen.Code, § 2970.) Admittedly, the defendant has no opportunity to contest this nonremission finding until the trial itself. Even so, because the defendant has already been found to present a substantial danger of physical harm to others and has already had notice of and an opportunity for a hearing on this finding, it does not offend due process to keep him or her confined, based on this substantial-danger finding, until the end of the trial. (See Cramer v. Gillermina R. (1981) 125 Cal.App.3d 380, 388-392, 178 Cal.Rptr. 69 [Fourth Dist., Div. Two] [persons previously committed to state hospital as mentally retarded and dangerous could be confined after the end of their commitment periods and until a trial on a recommitment petition without an adversarial probable cause hearing].)
Certainly we are concerned about the possibility that an MDO trial could be continued indefinitely without good cause (i.e., if the trial court finds good cause, but this finding is erroneous). Under those circumstances, if the defendant is eventually found to be an MDO, in the absence of prejudice, he or she will have no remedy by way of appeal; retrospectively, at least, the defendant should have been confined anyway. And if the defendant is eventually found not to be an MDO, he or she still has no remedy by way of appeal, because there is nothing to appeal. However, under those circumstances, precisely because there is no adequate remedy by way of appeal, the defendant's remedy is by way of a petition for an extraordinary writ. (See generally People v. Wilson (1963) 60 Cal.2d 139, 149-150, 32 Cal.Rptr. 44, 383 P.2d 452.)
*632 We therefore conclude that, assuming there was no good cause to continue the trial, not only beyond the 30-day limit, but even beyond defendant's release date, this did not violate defendant's right to due process. Moreover, because defendant has not shown prejudice, the assumed error is not reversible.

IV

DISPOSITION
The order appealed from is affirmed.
We concur: HOLLENHORST, Acting P.J., and MILLER, J.
NOTES
[*]   Pursuant to California Rules of Court, rules 8.1105 and 8.1110, this opinion is certified for publication with the exception of part II.
[**]   See footnote *, ante.
[1]  In People v. Kirkland (1994) 24 Cal.App.4th 891, 29 Cal.Rptr.2d 863 [Fourth Dist., Div. Two], we assumed, without deciding, that the 30-day deadline was jurisdictional. (Id. at p. 910, 29 Cal.Rptr.2d 863.) Subsequent cases have demonstrated that it is not.
[2]  Zachary also held that the defendant in an MDO proceeding is prejudiced when the petition is filed so late that he or she does not have time to prepare for trial before the end of the most recent commitment. (Zachary v. Superior Court, supra, 57 Cal.App.4th at pp. 1034-1036, 67 Cal.Rptr.2d 532.) Frye implicitly but necessarily overruled Zachary on this point.
[3]  Or her, but in the SVP context, it is usually his.
[4]  As the trial judge in this case perspicaciously noted, it could even be argued that some of the findings that are made when a defendant is made subject to treatment as a condition of parole are collateral estoppel in a subsequent MDO trial. We express no opinion on this question.
