
26 Cal.Rptr.3d 163 (2005)
127 Cal.App.4th 936
The PEOPLE, Plaintiff and Respondent,
v.
William B. MITCHELL, Defendant and Appellant.
No. A107291.
Court of Appeal, First District, Division Three.
March 23, 2005.
Rehearing Denied April 22, 2005.
Review Denied July 13, 2005.
*164 Paul Bernstein, Los Angeles, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Gerald A. Engler, Assistant Attorney General, René A. Chacón and Ralph Sivilla, Deputy Attorneys General for Plaintiff and Respondent.
McGUINESS, P.J.
William B. Mitchell appeals from a judgment granting the petition of respondent pursuant to Penal Code section 1026.5[1] to extend appellant's involuntary commitment, and ordering that his state hospital commitment as a mentally disordered offender be extended to January 16, 2006. Appellant contends the trial court abused its discretion by failing to dismiss the petition on the grounds it had been untimely filed without good cause. We disagree, and affirm.

FACTUAL AND PROCEDURAL BACKGROUND
In December 1981, appellant pleaded not guilty by reason of insanity to a charge of assault with a deadly weapon or force likely to produce great bodily injury (§ 245, subd. (a)). In January 1982, he was committed to Atascadero State Hospital pursuant to section 1026. Since that time, he has been continuously recommitted to a state mental hospital pursuant to section 1026.5.
On January 2, 2004, respondent filed a petition for extended commitment under sections 1026 and 1026.5. At the time, appellant's maximum term of commitment was due to expire on January 16, 2004. At the first court proceeding on the petition on January 7, 2004, Supervising Deputy Attorney General Joyce Blair, who had handled or supervised the handling of appellant's case on the People's behalf since 1991, stated that the petition had been untimely filed "[u]nfortunately, through a series of errors and mistakes." Defense counsel objected on the grounds that the trial "obviously ... could not be started within a reasonable period of time and certainly not 30 days before the maximum commitment date." The trial court continued the matter to January 16, 2004, and requested that respondent "provide this court with a detailed declaration of what ... is going on here."
Deputy Attorney General Blair filed a declaration with the trial court on January 15, 2004, in support of the petition. According to Blair's declaration, appellant had originally been charged with burglary; subsequently he assaulted his public defender in the courtroom. Blair stated that after being committed to the Department of Mental Health on a plea of not guilty by reason of insanity, appellant had remained in state mental hospitals, diagnosed with paranoia and schizophrenia, with mild retardation and a history of acting out sexually and failing to take his medication consistently. "On or around June 23, 2003," Napa State Hospital had timely transmitted a request that a petition for extension of appellant's commitment be filed under section 1026.5. Although she "personally *165 received that document," Blair had "misplaced it with records from another not guilty by reason of insanity case" and subsequently failed to "register" that appellant "was due for another extension proceeding by January 2004." Blair had "been informed" that appellant's assigned social worker had been sent an "extension alert" in August and again in October 2003; that on November 5, 2003, Napa State Hospital had faxed to the San Francisco District Attorney's Office a list of patients, including appellant, whose maximum term of commitment dates were approaching, with a request to be informed when recommitment petitions were filed and court dates set; and that Napa State Hospital staff subsequently attempted to contact the State Attorney General's office directly, both by telephone and fax, specifically about appellant's case, but without success.[2] It was not until she received a telephone message on December 31, 2003, asking whether a court hearing was scheduled on the recommitment petition Napa State Hospital had requested, that Blair undertook to file the extension petition on January 2, 2004. Blair stated she did not believe appellant would be prejudiced by a delay in the trial date beyond his maximum term of commitment date on January 16, 2004, because (a) according to Napa State Hospital's request for the extension petition, appellant continued to represent a substantial danger of physical harm to others on account of his mental disease, defect or disorder; and (b) appellant was represented by the same attorney who had represented him "on a number of past extension proceedings, including the last one," and who was "familiar" with appellant and his past medical records.
Nothing more appears in the record until March 12, 2004, when appellant filed a motion to dismiss the petition for lack of jurisdiction. Appellant's motion to dismiss argued that respondent's petition should be dismissed for lack of jurisdiction and for being in violation of appellant's constitutional rights to due process and effective assistance of counsel, because (a) it was filed less than 30 days prior to the expiration date of appellant's maximum term of commitment on January 16, 2004; (b) the trial on respondent's petition for extended commitment had not commenced prior to that date; and (c) respondent had shown no good cause for the delay. In response, respondent argued that the 30-day rule for *166 bringing the petition to trial, as specified in section 1026.5, subdivision (b)(4), was not jurisdictional.
The parties submitted the matter on their pleadings without argument. On March 19, 2004, without any discussion or findings, the trial court denied appellant's motion to dismiss the petition. Defense counsel immediately requested a continuance of trial to May 28, 2004, so that appellant could be evaluated by an expert. Without objection, the trial court granted the continuance.[3]
On May 26, 2004, appellant requested a further continuance, arguing that "[a]dditional time is needed in order to conduct an independent psychiatric evaluation of [appellant] and to prepare this case for trial." The trial court again granted the motion for a continuance, resetting trial for July 9, 2004. After yet another continuance to July 12, 2004, appellant personally waived his right to a jury trial. The trial court examined appellant directly, and determined that the waiver was "freely and voluntarily" made.
Court trial commenced on July 13, 2004. Dr. David San Giovanni, a licensed clinical psychologist employed by Napa State Hospital who had worked with appellant on a regular basis for over two and a half years, testified that appellant had a diagnosis of schizophrenia, paranoid-type, continuous, with hallucinations, delusions, disorganized thinking, impaired social judgment and self-care, failure to maintain bodily hygiene, and difficulty in social interactions. Based on his clinical judgment, forensic experience and training, and appellant's psychiatric diagnosis and symptomsincluding his substantial history of substance abuse, inappropriately sexual interactions with female staff, and failure to accept his mental illness or his need for medication Dr. San Giovanni opined that appellant had several risk factors associated with a prediction of dangerousness, rendering him a substantial danger of physical harm to others. In addition, Dr. San Giovanni testified to his clinical opinion that there was a "low probability" appellant would stay on his medications in an unsupervised environment, and that without medication, he would be at "higher risk" of dangerous behavior. At the request of defense counsel, trial was continued so that appellant could offer expert witness testimony in his defense. When trial continued on July 20, 2004, appellant offered the testimony of clinical psychologist Dr. John Shields, who testified based on the current state of research on risk assessment and behavioral prediction that there was no basis for a credible assessment of risk of future dangerousness based solely on clinical judgment or intuition.
On July 20, 2004, at the conclusion of trial and after argument by both sides, the trial court found beyond a reasonable doubt that appellant suffered from a severe mental disorder that was not in remission, as a result of which he represented a substantial danger of physical harm to others. On the basis of this determination, the trial court granted respondent's petition to extend appellant's commitment to January 16, 2006. This appeal timely followed.

DISCUSSION
Appellant contends the trial court's failure to dismiss respondent's petition to extend appellant's commitment constituted an abuse of discretion and a denial of due *167 process, because respondent failed to show any good cause for filing the petition so late that the trial could not commence within the 30-day timeframe established by the controlling statute. Appellant is wrong; there was no abuse of discretion or violation of appellant's right to due process in this case.
Sections 1026 and 1026.5 set out the procedures for committing individuals to state hospitals or other treatment facilities on felony pleas of not guilty by reason of insanity. Section 1026.5, subdivision (a) requires that a trial court committing any such person state in the commitment order the maximum term of commitment beyond which the person may not be kept in actual custody, except as provided in section 1026.5, subdivision (b). The latter subdivision in turn provides that, subject to certain procedural requirements, an individual may be committed beyond the maximum term of commitment set by the trial court pursuant to subdivision (a) if the commitment was based on a felony, and "by reason of a mental disease, defect, or disorder [the person] represents a substantial danger of physical harm to others." (§ 1026.5, subd. (b)(1).) "Not later than 180 days prior to the termination of the maximum term of commitment prescribed in subdivision (a)," the appropriate medical personnel of the state hospital, treatment facility or outpatient program where the individual is being treated "shall submit to the prosecuting attorney his or her opinion" as to whether, "by reason of a mental disease, defect or disorder," the individual represents a substantial danger of physical harm to others. (§ 1026.5, subd. (b)(2).)[4] The prosecuting attorney "may then file a petition for extended commitment in the superior court which issued the original commitment ... no later than 90 days before the expiration of the original commitment unless good cause is shown." (§ 1026.5, subd. (b)(2).)
The court "shall conduct" a trial on the petition for extended commitment, which must be by jury unless waived by both the individual to be recommitted and the prosecuting attorney, and which "shall commence no later than 30 calendar days prior to the time the person would otherwise have been released, unless that time is waived by the person or unless good cause is shown." (§ 1026.5, subd. (b)(4).) If, after a trial held in accordance with all constitutional guarantees applicable to criminal proceedings, the court or jury finds the individual represents a substantial danger of physical harm to others by reason of mental disease, defect or disorder, the court "shall order" the individual recommitted to the facility in which he or she was confined at the time of the petition, for an additional period of two years from the date of termination of the previous commitment. (§ 1026.5, subd. (7), (8).)
The undisputed record in this case shows that respondent filed its petition only two weeks before the expiration date of appellant's maximum term of commitment on January 16, 2004. This tardy filing ran afoul of both the statutory provision requiring filing of such a petition "no later than 90 days before the expiration of the original commitment" (§ 1026.5, subd. (b)(2)), and that requiring that a hearing on the petition for extended involuntary commitment must begin at least 30 days *168 before the scheduled release date, in the absence of either waiver or a showing of good cause (§ 1026.5, subd. (b)(4)). There was no waiver here, and respondent's proffered explanation of "reasons for the delay in filing of the petition" suggests, at best, inexcusable negligence. (Cf. In re Johns (1981) 119 Cal.App.3d 577, 579, 175 Cal. Rptr. 443 (Johns).)[5] Appellant contends: "As a matter of law, delay so long that defense counsel could not prepare for and conduct a hearing before the scheduled release date and termination of the previous commitment constitutes a prejudicial violation of due process, regardless of whether the statutory provision is jurisdictional." In effect, appellant contends the trial court must automatically dismiss a tardy section 1026.5 petition if the prosecution cannot demonstrate good cause to excuse the violation of the statutory deadlines. We disagree with appellant's interpretation of the statute.
It is well established that the time limits of section 1026.5 are not jurisdictional. (Johns, supra, 119 Cal.App.3d at pp. 580-581, 175 Cal.Rptr. 443; § 1026.5, subd. (a)(2).) In Johns, this court rejected a due process claim virtually identical to that made by appellant in this case regarding section 1026.5. The petition to extend involuntary commitment in Johns was filed 17 days late. As in this case, the defendant argued "that the inquiry should focus upon whether the prosecution has shown a proper justification for the delay, such as the factual impossibility of filing within the time limits." (Johns, supra, 119 Cal. App.3d at p. 581, 175 Cal.Rptr. 443.) This court expressly rejected this approach, concluding instead that "considerations of due process require an inquiry into whether the defendant was harmed by violation of the statutory time requirements.... [T]he inquiry should be the same as made when testing under due process standards the delay in criminal proceedings." (Ibid.) "[B]alancing ... any prejudicial effect of the delay against the justification for delay," this court held that "[e]xcept where there has been an extended delay, ... prejudice will not be presumed from delay. Where prejudice is not presumed, it is incumbent upon the defendant to show circumstances of actual prejudice." (Ibid.) In evaluating the particular circumstances of the due process claim at issue in that case, this court observed that "the delay was not extensive and trial was in fact held over 60 days after the petition was filed. Counsel was afforded at least as long to prepare the case as would have been available had the petition been timely filed." (Ibid.) On those facts, this court concluded the defendant "[c]learly ... was not prejudiced by the delay," and therefore "consideration of the reasons for the delay is unnecessary." (Ibid.) On that basis, this court held that there had been no abridgement of due process by the delay either in filing the petition, or in commencing trial. (Ibid.)
A more recent Sixth District case under a parallel statutory scheme is factually on point. People v. Williams (1999) 77 Cal. App.4th 436, 92 Cal.Rptr.2d 1 (Williams) arose under the Mentally Disordered Prisoners Act (§ 2960 et seq.), which governs petitions to continue involuntary medical treatment for mentally disordered offenders scheduled to be released on parole under sections 2970 and 2972. (Williams, supra, 77 Cal.App.4th at pp. 440, 444-445, 92 Cal.Rptr.2d 1.) In Williams, the district *169 attorney filed a petition for continued treatment 18 days before the defendant's scheduled release. (Id. at p. 445, 92 Cal. Rptr.2d 1.) Jury trial on the petition was commenced only 21 days thereafter, after the scheduled release date had already passed, and resulted in an order recommitting the defendant for an additional year of involuntary treatment. (Id. at pp. 441, 445-446, 92 Cal.Rptr.2d 1.) No express waiver of the time for trial was obtained from the defendant. The trial court did not require the district attorney to demonstrate good cause for the delay; nor did it make a finding on the record of good cause. "The matter simply proceeded to trial." (Id. at p. 446, 92 Cal.Rptr.2d 1.)
On appeal, the Williams court concluded that the "practical purpose" of the statutory 30-day trial deadline, requiring that trial on a petition for continued involuntary treatment commence at least 30 days before the defendant's scheduled release date, "is to ensure a reasonable amount of time in which to conduct a trial before the defendant is due to be released. [Citations.]" (Williams, supra, 77 Cal.App.4th at pp. 450-451, 92 Cal.Rptr.2d 1.) Although the deadline partly benefits the defendant, it also "`benefits the public: trial can be completed before a severely mentally disordered prisoner who poses a substantial danger of physical harm to others must be released.' [Citation.]" (Id. at p. 451, 92 Cal.Rptr.2d 1, quoting People v. Kirkland (1994) 24 Cal.App.4th 891, 913, 29 Cal.Rptr.2d 863.) The appellate court concluded that "the deadline is primarily designed to serve the interests of the public, rather than the [mentally disordered offender], by providing reasonable assurance that [such an offender] who has been receiving treatment for a severe mental disorder will not be released unless and until a determination is made that he or she does not pose a substantial danger to others." (Williams, supra, 77 Cal.App.4th at p. 451, 92 Cal.Rptr.2d 1.) On this basis, the Williams court affirmed the trial court's order of commitment, holding that "the 30-day deadline [on commencing trial] is directory and not mandatory." (Id. at pp. 451, 462, 92 Cal.Rptr.2d 1; cf. People v. Fernandez (1999) 70 Cal.App.4th 117, 128-130, 132, 82 Cal.Rptr.2d 469 [the 180-day deadline for submission of medical staff recommendation is directory rather than mandatory, and unexcused failure to comply with deadline did not prejudice defendant's preparation for trial on subsequent petition]; Kirkland, supra, 24 Cal. App.4th at pp. 910, 913-916, 29 Cal. Rptr.2d 863 [prosecution's failure to bring commitment extension petition to trial within 30-day deadline did not entitle defendant to dismissal where defendant made no specific showing of prejudice from delay].)[6]
Williams is clearly applicable here. In this case, as in Williams, the prosecution filed its petition two weeks before *170 appellant was to be releasedin Williams, because the defendant was due to be released on parole, and here because appellant's maximum term of commitment had expiredand trial on the petition commenced after the scheduled release date. The only pertinent distinction between this case and Williams is that here, the trial date was continued at appellant's own request, in order to give him adequate time to prepare his defense. As a result, in this case appellant had over six months to prepare for trial from the time respondent filed its petition to the actual date court trial commenced. While appellant complains that he suffered prejudice as a matter of law because he was forced "to choose between remaining in custody when there [was] no longer any legal basis for the custody or rushing to trial with insufficient preparation," he does not assert that he was denied a fair hearing or given insufficient opportunity to prepare for the trial which ultimately produced the commitment order now on appeal.
The cases on which appellant relies are all distinguishable. In Zachary v. Superior Court (1997) 57 Cal.App.4th 1026, 67 Cal.Rptr.2d 532, the district attorney's petition had been filed more than three weeks after the defendant's commitment term had already expired. The holding of the appellate court was based on that fact, and on its due process determination that the defendant had been given inadequate time to prepare for trial. (Id. at pp. 1034-1036, 67 Cal.Rptr.2d 532; cf. Williams, supra, 77 Cal.App.4th at pp. 454-457, 92 Cal.Rptr.2d 1.)[7] In People v. Dougherty (1983) 143 Cal.App.3d 245, 191 Cal.Rptr. 668, the petition was filed 66 days late and the defendant was thereafter forced to go to trial in 20 days, an inadequate time to prepare a defense. (Id. at pp. 246-247, 191 Cal.Rptr. 668.) The Court of Appeal concluded that the defendant had shown "actual prejudice" from the delay, because defense counsel had had insufficient time to secure a medical expert or prepare for effective cross-examination of the state's medical expert. (Id. at pp. 247-249, 191 Cal.Rptr. 668.) Finally, in People v. Hill (1982) 134 Cal.App.3d 1055, 185 Cal.Rptr. 64, the petition was filed nearly three months late and only 10 days before the scheduled terminal date of the defendant's confinement. Appointed defense counselwho, unlike defense counsel in this case, had never met the defendant beforewas left with less than a week to prepare for trial. (Id. at pp. 1057-1058, 185 Cal.Rptr. 64.)
In this case, defense counsel had represented appellant before, and was given ample time in which to investigate appellant's case, obtain expert medical testimony, and prepare a defense before going to trial. We conclude that because defense counsel "was afforded at least as long to prepare the case [for trial] as would have been available had the petition been timely filed" (Johns, supra, 119 Cal.App.3d at p. 581, 175 Cal.Rptr. 443), appellant suffered no actual prejudice from the delay. Consequently, the trial court's decision not to dismiss respondent's petition, and to proceed to trial, was not an abuse of discretion or a violation of due process, regardless of whether respondent was able to show good cause for its failure to file the petition in accordance with the directory time guidelines. Appellant's arguments to this court simply ignore the fact the trial court granted ample time to the defense to prepare its case for trial, obviating the kind of serious prejudice that has led appellate *171 courts to reverse in other cases of belatedly filed petitions to extend involuntary commitment. We do not condone the unnecessary detention of any individual past the date his or her maximum term of commitment is due to expire. Nevertheless, under the circumstances presented here, we conclude that appellant's due process rights were not violated. (Williams, supra, 77 Cal.App.4th at pp. 451-455, 92 Cal.Rptr.2d 1; Fernandez, supra, 70 Cal. App.4th at p. 132, 82 Cal.Rptr.2d 469; Johns, supra, 119 Cal.App.3d at p. 581, 175 Cal.Rptr. 443.)

DISPOSITION
The judgment is affirmed.
We concur: PARRILLI and POLLAK, JJ.
NOTES
[1]  Unless otherwise indicated, all further statutory references are to the Penal Code.
[2]  Blair's declaration stated: "On November 5, 2003, Napa State hospital faxed to the San Francisco District Attorney's Office a list of patients whose maximum term of commitment dates were approaching with a request to inform the hospital when petitions [were] filed and court dates set. Although it was noted on the document that [appellant] was an `AG' [Attorney General] matter, there is no record that either the District Attorney's Office forwarded the fax to the Attorney General's Office, or that such a reminder was sent to the Attorney General's Office. The San Francisco District Attorney's Office did not respond to Napa Hospital regarding [appellant].

"... Sometime around November 2003, Napa Hospital staff attempted to contact the Attorney General's Office by telephone regarding [appellant's] commitment date. Napa staff first contacted the mail clerk who had signed for the extension request in June. From there staff was directed to attorneys within the Attorney General's Health Quality Enforcement Section. They forwarded the call to a supervision [sic] in the Attorney General's Health Education and Welfare Section. That attorney suggested the matter was probably handled by the Criminal Division and my name and fax number were given. Apparently, some document regarding [appellant] was then sent via fax to me, but Napa staff believe my name may not have been on that document. I never received such a document, and I can only assume since there are approximately 100 people on my floor [who] use the fax number that was given, the receptionist had no way of knowing to whom such document should be directed."
[3]  In written pleadings filed March 19, 2004, in support of the defense motion for a continuance, defense counsel stated: "A continuance would not prejudice the people's case and would ensure [appellant's] rights to a fair hearing, confrontation of the witnesses and effective assistance of counsel."
[4]  The uncontested record in this case shows that "[o]n or around" June 23, 2003, an evaluation was submitted by authorities at Napa State Hospital to the Attorney General requesting that appellant's commitment be extended pursuant to section 1026.5, subdivision (b). Because this was more than 180 days before the termination of appellant's maximum term of commitment on January 16, 2004, we conclude this particular time deadline was met in accordance with section 1026.5, subdivision (b)(2).
[5]  We note there is nothing in the record to suggest that respondent intentionally delayed filing the petition for extended commitment, or did so in conscious disregard of the statutory requirement that trial on such a petition be commenced at least 30 days before the scheduled release date.
[6]  "Last, we observe that if the 30-day deadline were mandatory, then the failure to comply would, in effect, automatically terminate [a mentally disorder offender]'s involuntary treatment, regardless of need, and require his or her release, regardless of the potential danger to others. Such a result is inconsistent with the purpose of the [statute] and elevates the secondary benefit of the deadline to [a defendant] over the fundamental purpose of the [statute]: to protect the public." (Williams, supra, 77 Cal.App.4th at p. 451, 92 Cal.Rptr.2d 1.)

In further support of its holding, the Williams court specifically noted that "the statute does not expressly set any deadline for completion of a trial, even if it begins more than 30 days before a release date. Nor does it limit continuances or otherwise prohibit a court from extending a trial beyond the release date if necessary." (Williams, supra, 77 Cal.App.4th at p. 452, 92 Cal.Rptr.2d 1.) The court also observed that the statute in question did not prescribe any sanction or other consequence for violation of the 30-day rule. (Id. at p. 451, 92 Cal.Rptr.2d 1.)
[7]  Similarly in People v. Pacini (1981) 120 Cal.App.3d 877, 174 Cal.Rptr. 820, another case relied upon by appellant, the initial petition was filed after the maximum period of confinement had already expired. (Id. at pp. 880, 891, 174 Cal.Rptr. 820.)
