People v. Lara

*221Opinion

CORRIGAN, J.

Defendant David Alan Lara was tried for false imprisonment of a child, found not guilty by reason of insanity (NGI), and committed to a state hospital. A petition to extend his commitment was filed so late that he did not have adequate time to prepare for trial before his term ended. There was no good cause for the late filing. His motion to dismiss the petition on due process grounds was denied, and he was recommitted.

We hold: (1) The statutory deadline for filing an extension petition is directory, not mandatory, so long as the petition is filed before the expiration of the current commitment. (2) Defendant was not entitled to a dismissal of this petition. (3) Upon motion, he would have been entitled, under due process, to release pending trial, subject to possible proceedings under the Lanterman-Petris-Short Act (LPS Act).1 (4) Defendant is not now eligible for release, however, because the court retained jurisdiction to try him and he received a fair trial.

I. FACTUAL AND PROCEDURAL BACKGROUND

A defendant found not guilty by reason of insanity is committed to a state hospital or other treatment facility, unless sanity has been fully restored.2 If the court orders such a commitment, it is required to set a maximum term,3 defined as the longest prison term that could have been imposed on the defendant.4 Subdivision (a)(2) of section 1026.5 sets out the general rule that “[a] person may not be kept in actual custody longer than the maximum term of commitment, except as provided in subdivision (b).” (Italics added.)

Subdivision (a)(2) of section 1026.5 requires that the Board of Parole Hearings (formerly Board of Prison Terms) calculate the maximum term for defendants who committed a felony before July 1, 1977, and thus fell under *222the indeterminate sentencing law. The subdivision goes on to state, “The time limits of this section are not jurisdictional.” (Italics added.)

Subdivision (b) of section 1026.5 sets out the exclusive procedures under which a commitment may be extended. A commitment may be extended only in felony cases and only when the defendant5 “represents a substantial danger of physical harm to others” due to “a mental disease, defect, or disorder.” (§ 1026.5(b)(1).) Various numbered paragraphs of subdivision (b) set out specific time limits within which actions “shall” be taken. At least 180 days before the current term ends the medical director “shall” provide the district attorney with an opinion as to whether the defendant’s commitment should be extended. (§ 1026.5(b)(2).) The prosecution “may” then file for an extension of commitment. (Ibid.) Unless good cause is shown, the petition “shall” be filed at least 90 days before the commitment is to expire. (Ibid.) Unless good cause is shown, a trial on the petition “shall” begin at least 30 days before the existing commitment is due to end. (§ 1026.5(b)(4).) If the defendant is proven to currently represent a substantial danger as described in the statute, the court shall order a recommitment for an additional two years. (§ 1026.5(b)(8).) The defendant “may not be kept in actual custody longer than two years unless another extension of commitment is obtained in accordance with the provisions of this subdivision.” (Ibid.)

In this case, the trial court found that defendant had falsely imprisoned a child at knifepoint (§§ 236, 237), but was not guilty by reason of insanity. The court set the maximum term at six years, based on the aggravated term of three years doubled because defendant had sustained a prior strike conviction. Based on that commitment defendant was due for release on October 15, 2004.

The medical director gave timely notice to the district attorney that defendant’s commitment should be extended. However, the district attorney took no action until September 21, filing a petition for extension less than a month before defendant’s scheduled release date. On September 29, defense counsel orally moved to dismiss the petition for failure to comply with the statutory 90-day filing deadline. “[T]o preserve the record,” counsel asked for a trial date before October 15, but expressed concern that she could not be prepared by that time. “I have tried to reach Mr. Lara, and I have not even been able to speak to him.” The prosecutor opposed the motion, but offered no explanation for the delay. The court took the matter under submission. On *223October 7, defendant moved in writing to dismiss for failure to comply with the statutory time limits, depriving him of due process.

At an October 12, 2004, hearing, defense counsel explained why she could not prepare for trial by October 15. Although she had received the extension petition on September 29, she was unable to contact defendant at the hospital until October 1, and could not meet with him until October 7. The return on her subpoena duces tecum for defendant’s records was set for October 15. She had to review the records before deciding whether to seek an independent psychiatric evaluation. The prosecutor conceded that the delay in filing the extension petition was not excused by good cause,6 and did not argue that the defense could reasonably be ready for trial before defendant’s term expired. The trial court denied the dismissal motion, but made no finding whether defense counsel had adequate time to prepare for trial before defendant’s scheduled release date.

On October 18, defendant filed for writs of habeas corpus, mandate and/or prohibition in the Court of Appeal. The petitions were denied on December 6,7 and this court denied review on February 16, 2005.8

On May 13, 2005, almost seven months after defendant’s original commitment ended, a jury found that he represented a substantial danger of physical harm to others. The trial court extended his commitment for two years, running from the date his term originally was to expire.

On July 17, 2007, the Court of Appeal reversed, directing that the trial court grant defendant’s motion to dismiss because he had been denied due process.

We reverse the judgment of the Court of Appeal. Defendant was not entitled to dismissal of the extension petition on due process grounds. Had he so moved, he would have been entitled to release pending trial on the petition, subject to possible LPS Act proceedings. However, no relief is *224available at this stage. The court retained jurisdiction to try the petition. The fact that defendant was not released did not affect the validity of the extension order.9

II. DISCUSSION

A. The Statutory Deadlines Are Directory

Defendant contends that the statutory deadlines were mandatory, and because they were not met, the court lost jurisdiction to try the case. This argument fails.

People v. Williams (1999) 77 Cal.App.4th 436 [92 Cal.Rptr.2d 1] (Williams) is one of many cases that have grappled with the question of whether a failure to meet a statutory deadline deprives a court of jurisdiction. It explained that the concept of jurisdiction can be used in somewhat differing ways.

“When courts use the phrase ‘lack of jurisdiction,’ they are usually referring to one of two different concepts, although, as one court has observed, the distinction between them is ‘hazy.’ (People v. Mendez (1991) 234 Cal.App.3d 1773, 1781 [286 Cal.Rptr. 216].)” (Williams, supra, 77 Cal.App.4th 436, 447.) A lack of jurisdiction in its fundamental or strict sense results in “ ‘an entire absence of power to hear or determine the case, an absence of authority over the subject matter or the parties.’ (Abelleira v. District Court of Appeal (1941) 17 Cal.2d 280, 288 [109 P.2d 942].) On the other hand, a court may have jurisdiction in the strict sense but nevertheless lack ‘ “jurisdiction” (or power) to act except in a particular manner, or to give certain kinds of relief, or to act without the occurrence of certain procedural prerequisites.’ (Ibid.) When a court fails to conduct itself in the manner *225prescribed, it is said to have acted in excess of jurisdiction.” (Ibid.; see generally 2 Witkin, Cal. Procedure (5th ed. 2008) Jurisdiction, §§ 1, 285, pp. 575-576, 891-892.)

The distinction is important because the remedies are different. “ [Fundamental jurisdiction cannot be conferred by waiver, estoppel, or consent. Rather, an act beyond a court’s jurisdiction in the fundamental sense is null and void” ab initio. (Williams, supra, 77 Cal.App.4th at p. 447.) “Therefore, a claim based on a lack of . . . fundamental jurisdiction!] may be raised for the first time on appeal. (People v. Chadd (1981) 28 Cal.3d 739, 757 [170 Cal.Rptr. 798, 621 P.2d 837].) ‘In contrast, an act in excess of jurisdiction is valid until set aside, and parties may be precluded from setting it aside by such things as waiver, estoppel, or the passage of time. [Citations.]’ (People v. Ruiz[ (1990)] 217 Cal.App.3d [574], 584 [265 Cal.Rptr. 886]; In re Andres G. (1998) 64 Cal.App.4th 476, 482 [75 Cal.Rptr.2d 285].)” (Ibid.; see, e.g., People v. American Contractors Indemnity Co. (2004) 33 Cal.4th 653, 660-661 [16 Cal.Rptr.3d 76, 93 P.3d 1020].)

Whether the failure to follow a statute makes subsequent action void or merely voidable “ ‘has been characterized as a question of whether the statute should be accorded “mandatory” or “directory” effect. If the failure is determined to have an invalidating effect, the statute is said to be mandatory; if the failure is determined not to invalidate subsequent action, the statute is said to be directory.’ (People v. McGee (1977) 19 Cal.3d 948, 958 [140 Cal.Rptr. 657, 568 P.2d 382] . . . .)” (City of Santa Monica v. Gonzalez (2008) 43 Cal.4th 905, 923 [76 Cal.Rptr.3d 483, 182 P.3d 1027] (City of Santa Monica).)10

Whether a particular statute is intended to impose a mandatory duty is a question of interpretation for the courts. (City of Santa Monica, supra, 43 Cal.4th at p. 924.) “Unless the Legislature clearly expresses a contrary intent, time limits are typically deemed directory.” (Allen, supra, 42 Cal.4th at p. 102.) Here, the Legislature made its intent quite clear. Section 1026.5(a)(2) expressly provides that “[t]he time limits of this section are not jurisdictional.” (Italics added.) Defendant seeks to circumvent that clear statement by relying on the use of the term “shall” in various paragraphs of subdivision *226(b).11 Defendant argues that, although the Legislature specifically said the time limits set out in “this section are not jurisdictional,”12 it really intended to say that the time limits set out “in subdivision (a)” are not jurisdictional. Defendant’s construction ignores the plain meaning of the statutory language, is at odds with the explicit manner in which section 1026.5 is drafted, and runs counter to accepted canons of statutory construction.

The Penal Code contains many thousands of numbered sections. Section 7, paragraph 20 reads: “The word ‘section,’ whenever hereinafter employed, refers to a section of this code, unless some other code or statute is expressly mentioned.”13 Defendant’s construction ignores this express definition of the term “section.” It is also inconsistent with the internal structure of section 1026.5 and the way the Legislature precisely used the term “section” throughout the provision. The very first sentence of the section provides that no one may be kept in actual custody beyond the maximum term of commitment, “except as provided in this section.” (§ 1026.5(a)(1), italics added.) The next sentence defines the meaning of “maximum term of commitment” for “purposes of this section.” {Ibid., italics added.) The exception referred to is contained, not in subdivision (a), but in subdivision (b). The phrase “maximum term of commitment,” while originally defined in subdivision (a), is used a number of times throughout the entire section. Clearly, the Legislature intended to use the term “section” to refer to the whole of section 1026.5.

As the court noted in In re Johns (1981) 119 Cal.App.3d 577 [175 Cal.Rptr. 443] {Johns): “Throughout section 1026.5, the Legislature was precise in using the terms ‘paragraph’ and ‘subdivision’ to identify the various divisions of the lengthy and complex section. Indeed, in the sentence preceding the one under scrutiny, the Legislature singled out ‘paragraph (1)’ and ‘subdivision (b)’ for coverage and exclusion.” {Id. at p. 580; accord, People v. Dougherty (1983) 143 Cal.App.3d 245, 247 [191 Cal.Rptr. 668] (Dougherty)', see People v. Mitchell (2005) 127 Cal.App.4th 936, 944 [26 Cal.Rptr.3d 163]; People v. Fernandez (1999) 70 Cal.App.4th 117, 129-130 [82 Cal.Rptr.2d 469] (Fernandez) [mentally disordered offender statute’s 180-day deadline for medical director to submit written evaluation to district attorney not mandatory].) We conclude that the Legislature’s statement that *227“[t]he time limits of this section are not jurisdictional”14 refers to all the time limits set out in Penal Code section 1026.5, not only to the limits referred to in subdivision (a).

With regard to defendant’s reliance on the use of the word “shall,” it should not be assumed that every statute that uses that term is mandatory. (Nunn v. State of California (1984) 35 Cal.3d 616, 625 [200 Cal.Rptr. 440, 677 P.2d 846]; Morris v. County of Marin (1977) 18 Cal.3d 901, 910-911, in. 6 [136 Cal.Rptr. 251, 559 P.2d 606].) “Neither the word ‘may,’ nor the word ‘shall,’ is dispositive.” (Allen, supra, 42 Cal.4th at p. 102.) The context of the language, as well as other indicia of legislative intent, must be considered. (DuBois v. Workers’ Comp. Appeals Bd. (1993) 5 Cal.4th 382, 388 [20 Cal.Rptr.2d 523, 853 P.2d 978].) The preceding analysis demonstrates that the Legislature’s clear intent was to use the term “section” to refer to the entirety of section 1026.5.

Yet another factor supports our conclusion as to legislative intent. The Legislature’s failure to include a penalty or consequence for noncompliance with the statutory procedure also indicates that the requirement is directory rather than mandatory. (California Correctional Peace Officers Assn. v. State Personnel Bd. (1995) 10 Cal.4th 1133, 1145 [43 Cal.Rptr.2d 693, 899 P.2d 79] (Correctional Peace Officers); Edwards v. Steele (1979) 25 Cal.3d 406, 410 [158 Cal.Rptr. 662, 599 P.2d 1365] (Edwards).) Section 1026.5 does not say that a trial is precluded if the statutory time limits are not met. Indeed, the statute itself provides that the time limits are not binding if good cause is shown for not having met them,15 and also provides that a defendant may waive time to allow proceedings beyond the timeframes set out.16 It is black letter law that fundamental jurisdiction may not be conferred by waiver, estoppel, or consent. (Rest.2d Judgments, § 12, com. b, p. 117; 2 Witkin, Cal. Procedure, supra, Jurisdiction, § 13, p. 585.) Thus, the interpretation defendant urges would render the good cause and time waiver provisions nullities. Not only are statutes not ordinarily interpreted in a fashion that renders part of them void,17 the Legislature’s provision for good cause findings and time waivers is an additional demonstration of its intent that the limits were not intended as mandatory.

*228Finally, we must ask whether the purposes of the statute would be promoted or defeated if the filing deadline were construed as mandatory. (See Correctional Peace Officers, supra, 10 Cal.4th at p. 1145; Edwards, supra, 25 Cal.3d at p. 410.) Holding it to be mandatory would mean that a court, faced with a filing deadline missed for good cause, would be powerless to extend treatment under the statute no matter how great the defendant’s need or the danger release might pose to the public. Such an interpretation would run counter to the very purposes of the NGI statutes and the provision for extension of commitment. It would elevate the secondary benefit to the defendant derived from the time limit over the fundamental purposes of the NGI provisions, to ensure that needed treatment is provided and the public protected. (Cf. Williams, supra, 77 Cal.App.4th at p. 451 [construing the time limit provisions of the Mentally Disordered Offender Act].)18

Defendant’s reliance on Allen, supra, 42 Cal.4th 91, is misplaced. In Allen, the district attorney filed a petition to extend the commitment of a mentally disordered offender (MDO) after the defendant’s previous commitment had ended. (Id. at p. 95.) Section 2972, subdivision (e), part of the Mentally Disordered Offender Act (MDO Act) permits an extension petition to be filed before the current commitment ends. We concluded that this statutory requirement of filing before the expiration of the commitment is mandatory. (Allen, at p. 104.) Accordingly, we affirmed the judgment of the Court of Appeal, which had reversed the trial court’s commitment order with directions that the extension petition be dismissed. (Id. at pp. 96, 109.) Unlike Allen, the extension petition here was filed before defendant’s current commitment ended.19

*229B. Due Process

A “root requirement” of due process is that an individual be given an opportunity for a hearing before being deprived of any significant liberty or property interest, except for extraordinary situations where some valid governmental interest is at stake that justifies postponing the hearing until after the event. (Boddie v. Connecticut (1971) 401 U.S. 371, 379 [28 L.Ed.2d 113, 91 S.Ct. 780]; see In re Roger S. (1977) 19 Cal.3d 921, 937 [141 Cal.Rptr. 298, 569 P.2d 1286].)

Here, without good cause, the petition to extend defendant’s NGI commitment was filed so late he did not have adequate time to prepare for trial before his term ended. (See, ante, at p. 223.) Therefore, as we explain in part II.C., post, due process would have required that he be released pending trial, subject to LPS Act proceedings. An established line of California cases supports this analysis. We note at the outset, however, that these cases incorrectly identify the remedy for such due process denials. Insofar as they conclude that the extension orders should have been dismissed, they are disapproved.20 We discuss the fashioning of a remedy in greater detail in part n.c., post.

In People v. Hill (1982) 134 Cal.App.3d 1055 [185 Cal.Rptr. 64] (Hill), an NGI extension petition was filed 10 days before the maximum commitment date. The public defender was appointed only five court days before the existing commitment was to expire. Counsel had not yet met the defendant, his medical reports were unavailable, and independent experts had yet to be appointed. Undeterred by these realities, the trial court inquired why counsel could not proceed immediately and complete the trial before the current commitment ended. It did, however, grant a two-day continuance. Two days later counsel again argued that she could not possibly be prepared for trial in the next three days. The trial court expressed displeasure, noting that any number of lawyers had been able to begin trial on the very day of their appointment. Trial was ultimately held more than a year after the defendant’s commitment had expired. (Id. at pp. 1057-1059.)

The Court of Appeal observed that the statutory time limits served the clear legislative objective to allow the defense “not less than 60 days to prepare for *230trial, and 30 days within which to complete such trial, without confining him beyond the maximum period permissible under his initial commitment. [Citations.]” (Hill, supra, 134 Cal.App.3d at p. 1057.) It responded to the trial court’s observation that some counsel are able to proceed on the very day of their appointment. “While there may be attorneys extant who are so blessed with uncommitted time and the intellectual quickness to remain steadily mounted during such an instance of galloping justice, we cannot fault [Hill’s counsel] for her acknowledged inability to do so.” (Id. at p. 1058.) Finally, the court concluded that “it was realistically quite impossible in the brief time that remained to bring this matter to even the most hurried conclusion with any semblance of due process.” (Id. at p. 1060.) The order extending the defendant’s commitment was reversed. (Id. at p. 1061.)

Similarly, in People v. Hawkins (1983) 139 Cal.App.3d 984 [189 Cal.Rptr. 126], an NGI extension petition was filed 45 days beyond the 90-day cutoff date, and counsel was not appointed until two days before trial was required by statute to begin. (Id. at pp. 986-988.) The Court of Appeal affirmed the trial court’s dismissal of the petition as a denial of due process. (Id. at p. 988.)

In Dougherty, supra, 143 Cal.App.3d 245, the maximum NGI commitment date was November 8, 1981. The extension petition was not filed until October 14, and trial was set for November 2. A defense motion for dismissal made on the trial date was denied. (Id. at pp. 246-247.) Reversing the order extending the commitment, the Court of Appeal applied the due process analysis set out in Johns, supra, 119 Cal.App.3d 577. “ ‘Except 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.’ (119 Cal.App.3d at p. 581; see Scherling v. Superior Court (1978) 22 Cal.3d 493, 505 [149 Cal.Rptr. 597, 585 P.2d 219]; Crockett v. Superior Court (1975) 14 Cal.3d 433, 440-441 [121 Cal.Rptr. 457, 535 P.2d 321].)” (Dougherty, supra, 143 Cal.App.3d at p. 248.)

The Dougherty court went on to consider the question of prejudice. As the result of the late filing, the defense had only 20 days, rather than 60, to prepare before the commitment term expired. “At the outset of trial, counsel informed the court that there had been insufficient time to secure the appointment of medical experts (§ 1027). During trial[,] counsel interrupted his cross-examination of the state hospital psychologist to complain to the court, outside the presence of the jury, that he was unable effectively to cross-examine the witness effectively because there had been insufficient time to subpoena appellant’s psychiatric file in advance of trial. Counsel stated further that he was incapable of effectively cross-examining the psychologist without professional assistance. The record thus supports appellant’s contention that the delay had the prejudicial effect of depriving counsel of an *231adequate time to prepare. (Cf. In re Newbern (1960) 53 Cal.2d 786, 790-791 [3 Cal.Rptr. 364, 350 P.2d 116]; People v. Hill, supra, 134 Cal.App.3d at pp. 1059-1060; see People v. Hawkins, supra, 139 Cal.App.3d at p. 987.) This conclusion requires that we consider the reasons for the delay. (Cf. Scherling v. Superior Court, supra, 22 Cal.3d at p. 506; In re Johns, supra, 119 Cal.App.3d at p. 581.)” (Dougherty, supra, 143 Cal.App.3d at p. 248, fn. omitted.)

In Dougherty, the medical director’s negligence resulted in a late submission of his extension recommendation. (Dougherty, supra, 143 Cal.App.3d at p. 249.) The Dougherty court weighed that reason against the resulting prejudice. “As the Supreme Court stated in Scherling v. Superior Court, supra, ‘[t]he ultimate inquiry in determining a claim based upon due process is whether the defendant will be denied a fair trial. . . . Thus, although delay may have been caused only by the negligence of the government, the prejudice suffered by a defendant may be sufficient when balanced against the reasons for the delay to constitute a denial of due process.’ (22 Cal.3d at p. 507.) While here, unlike Scherling, the effect of the delay was not to deprive appellant of his right to speedy trial, but rather to force him to trial in less than the minimum time provided by statute to prepare a defense, the due process analysis is the same. (See In re Newbern, supra, 53 Cal.2d at p. 791; People v. Hawkins, supra, 139 Cal.App.3d at p. 987; People v. Hill, supra, 134 Cal.App.3d at p. 1060.) Because the justification for the delay is outweighed by its prejudicial effect, the order extending appellant’s commitment was entered in violation of his right to due process.” (Dougherty, supra, 143 Cal.App.3d at p. 249.)

These principles have recently been applied in People v. Tatum (2008) 161 Cal.App.4th 41 [73 Cal.Rptr.3d 718] (Tatum). Tatum had been committed as an MDO with a maximum commitment date of March 12, 2007.21 The district attorney did not file an extension petition until February 7. (Tatum, at p. 48.) As of March 2, 10 days before the commitment was to end, the defense had not received the hospital records. The court set trial for the last day of Tatum’s current commitment. On that date, defense counsel told the court she still had received no hospital records and could not adequately represent the defendant. She argued that any further unauthorized confinement would deprive Tatum of due process. (Id. at pp. 49-51.) The court dismissed the petition and the Court of Appeal affirmed. (Id. at pp. 46-47.)

*232The Tatum opinion ably marshals the approach to be employed in determining whether a due process violation has occurred. As we have explained in part II.A., ante, a failure to comply with one of the statutory time limits does not mandate a dismissal. Instead, the due process question must be evaluated on a case-by-case basis. “Consistent with the large body of case law that has developed over the preceding decades, a trial court faced with the question of whether to dismiss a late-filed MDO petition must evaluate the circumstances of the delay and the implications of continuing with trial under a due process rubric.” (Tatum, supra, 161 Cal.App.4th at p. 60.) “[D]ue process in this context requires a flexible balancing of ‘any prejudicial effect of the delay against the justification for the delay.’ (Fernandez, supra, 70 Cal.App.4th at p. 131 [‘If the defendant fails to demonstrate prejudice, the court need not consider the reasons for the delay.’] . . . .)” (Id. at p. 61.)

The late filing of an extension petition potentially gives rise to two types of prejudice: (1) inability to prepare for trial in the remaining time; or (2) involuntary commitment beyond the release date. (Tatum, supra, 161 Cal.App.4th at p. 61.) When a petition is filed just before the release date, “the offender is often forced to choose between these two types of prejudice. Either the offender must curtail otherwise necessary trial preparation to ensure a ‘preexpiration trial’ (Zacharyl v. Superior Court (1997) 57 Cal.App.4th 1026,] 1036 [67 Cal.Rptr.2d 532]) or agree to a continuance of the trial date beyond the release date, thus suffering unauthorized postrelease confinement. . . . [W]henever the state’s unexcused late filing of an MDO petition forces an offender to ‘choose’ between these two types of prejudice, some prejudice is necessarily established.” (Tatum, supra, 161 Cal.App.4th at p. 61.)

The degree of prejudice will depend on a variety of factors, including how late the filing is, the amount of time reasonably required to prepare for trial and mount a defense, and whether action by the court or defense counsel contributed to the delay. (See Tatum, supra, 161 Cal.App.4th at pp. 61-62.) It should be noted that both the NGI and MDO recommitment statutes provide for a defense waiver of the 30-day time limit for beginning trial. (§§ 1026.5(b)(4), 2972, subd. (a).) There may certainly be circumstances in which a waiver of time for trial is determined by counsel to be in the client’s best interest. So long as the decision to waive time is not forced by unexcused prosecutorial delays, due process would not ordinarily be implicated.

The Attorney General argues that defendant suffered no prejudice. As we shall explain, the cases on which he relies do not assist him, but they do show how different factual scenarios may yield differing results. First, however, it is useful to distinguish between the two senses in which the term “prejudice” *233is used in these cases. Defendant did suffer prejudice in one sense. The prosecution’s unexcused late filing forced him to choose between going to trial unprepared or being held without trial beyond the release date. As explained previously, the remedy for this prejudice would have been release pending trial, subject to LPS Act proceedings. However, defendant did not suffer prejudice in the primary sense of the term. The fairness of his eventual trial was not affected by the due process violation. (See People v Woodward (1992) 4 Cal.4th 376, 387 [14 Cal.Rptr.2d 434, 841 P.2d 954] (Woodward).)22 He was ultimately tried by jury, represented by competent and prepared counsel, and accorded all applicable trial safeguards. With this distinction in mind we turn to the cases.

In Johns, supra, 119 Cal.App.3d 577, an NGI extension petition was filed 17 days late. (Id. at p. 579.) Had trial begun the full 30 days before the commitment expired,23 the defense would not have had the full 60 days for preparation.24 Instead, the trial began beyond the 30-day limit. It was completed before the commitment expired, and the commitment was extended. In reviewing Johns’s due process claim, the Court of Appeal noted that prejudice would not be presumed because the filing delay was not lengthy. (Johns, at p. 581.) Thus, the defendant bore the burden to establish actual prejudice. He failed to do so. He was given the full 60 days to prepare, and did not cite any prejudice attributable to his trial beginning less than 30 days before his original commitment ended. (Ibid.) Johns is distinguishable from our case. Here, the showing of prejudice is substantially stronger. Because a showing of prejudice was made, inquiry into the reasons for the delay was required. There was no showing of good cause. (See, ante, at p. 223.) Finally, unlike Johns, defendant here was subjected to nearly seven months of additional confinement after his release date, but before the adjudication to which he was entitled. (See, ante, at p. 223.)

Fernandez, supra, 70 Cal.App.4th 117, is also distinguishable. It involved an MDO extension. The medical director’s 180-day evaluation letter25 was not sent to the district attorney until 50 days before Fernandez’s scheduled release date. (Fernandez, at p. 127.) The prosecutor promptly filed an extension petition, but the trial court found, and the Court of Appeal agreed, that the medical director’s delay was unsupported by good cause. (Id. at pp. 127-128.) Fernandez had only 29 days to prepare for trial (id. at p. 132), *234but he failed to show prejudice. Counsel never argued she was unprepared or unable to proceed. The defendant’s continuances were granted before trial and adequate time was afforded to submit briefing. (Ibid.) As the court noted, a showing of actual prejudice “ ‘must be supported by particular facts and not ... by bare conclusionary statements.’ (Crockett v. Superior Court[, supra,] 14 Cal.3d 433, 442 . . . .)” (Id. at pp. 132-133.) Fernandez was not prejudiced. He “had adequate time to prepare and present his defense . . . .” (Id. at p. 134.)

Fernandez was held for 12 days beyond his release date before his trial was completed and the recommitment order issued. The Court of Appeal rejected his claim that this delay constituted a denial of due process. The record revealed the trial date was extended beyond Fernandez’s scheduled release date because his own counsel requested continuances and not because of the prosecutor’s failure to comply with any statutory deadlines. (Fernandez, supra, 70 Cal.App.4th at p. 133.) Once the prosecutor received the medical director’s letter, he issued expedited subpoenas to assist the defense in obtaining necessary documents. The original trial date was set before the commitment expired and the prosecutor was ready to begin on that date. The defense reported that the district attorney had made every effort to resolve the case expeditiously. (Id. at p. 134.) “Ultimately, the trial on the merits was concluded in one day. Except for the continuance requested by defense counsel, the trial would have been completed before defendant’s release date. Although the trial court was within its discretion to grant the continuance requested by defense counsel, defendant may not now claim prejudice from this same delay requested on his behalf. To allow otherwise would allow defendants to request numerous continuances for good cause, pushing the trial past the release date, and then claim prejudice from the continued trial.” (Id. at p. 133.) In making its evaluation, the trial court properly considered the timing of the medical director’s letter, diligent efforts made by the prosecution in filing the petition and in assisting the defense to acquire discovery, reasonable preparation time for both parties, the continuances requested by the defense and the circumstances attendant to those requests, and the ultimate date of the proceedings. Thus, Fernandez does not assist the Attorney General. It stands for the proposition that the complained-of prejudice must be attributable to the People’s failure, not to legitimate requests made by the defense. Here it was the prosecution’s tardiness that necessitated the delay.

In Williams, supra, 77 Cal.App.4th 436, the district attorney filed an MDO extension petition only 18 days before Williams’s scheduled release date, and Williams was not brought before the court until two days before that date. Trial began two days after the release date and took two days to complete. (Id. at pp. 445-446.) Williams was represented by counsel, who did not object when the trial date was set. (Id. at pp. 440, 461-462.) Having *235determined that the failure to comply with the 30-day limit for beginning trial did not vitiate fundamental jurisdiction (id. at pp. 447^-51), the Court of Appeal turned to whether Williams’s failure to object to the trial date waived any claim based on noncompliance with section 2972, subdivision (a)’s 30-day time limit. The court analogized to failure to object to noncompliance with section 1382, which provides that a criminal defendant must be tried within 60 days of the filing of an indictment or information, absent a finding of good cause, a time waiver, or consent. Under the rule of People v. Wilson (1963) 60 Cal.2d 139 [32 Cal.Rptr. 44, 383 P.2d 452], consent to the setting of trial beyond the statutory limit will be presumed when a defendant does not object to the date set and does not move to dismiss the action before trial begins. (Id. at p. 146.) As the Williams court observed: “Consequently, a violation of section 1382 may not be raised for the first time either on appeal or in a posttrial petition for writ of habeas corpus if the defendant, who was represented by counsel, failed to object to the trial date and make a timely motion to dismiss after the applicable period expired.” (Williams, supra, 77 Cal.App.4th at p. 460.) The court held: “We find no meaningful basis to distinguish an alleged violation of section 2972(a) from a violation of section 1382. The deadlines prescribed in both statutes relate to the time within which trial must be commenced. Both statutes provide that the period may be waived or excused for good cause. And when a violation of either statute has allegedly occurred, a pretrial objection and motion to dismiss permits the trial court to make a timely determination, which in turn may obviate the need for a trial.” (Ibid.)

Again our case is distinguishable. Here, the defense repeatedly objected to the setting of the trial date, made its case for the demonstration of prejudice, and even sought writ review. (See, ante, at pp. 222-223.)

C. Remedy

As we have explained, a failure to comply with section 1026.5’s time limitations does not deprive a court of fundamental jurisdiction, so long as an extension petition is filed before the end of the defendant’s current term. (See pt. II.A., ante.) Therefore, the question arises as to what course of action a court should take when such a failure occurs. As our discussion of Johns, supra, 119 Cal.App.3d 577, and Fernandez, supra, 70 Cal.App.4th 117, makes clear, no remedial action need be taken if the defendant suffers no prejudice from the delay. Likewise, if the defendant does not object, waives time, or consents to a trial date beyond the expiration of the commitment, the defendant may remain confined and the court may go forward with trial on the petition. (Williams, supra, 77 Cal.App.4th at p. 460.)

As we explained in Allen, supra, 42 Cal.4th 91, if an extension petition is not filed before the current commitment ends, the defendant is no longer *236subject to constraint under the NGI or MDO statutes. If a petition is filed before the expiration date, but too late to allow a reasonable time for trial preparation, a defendant who so moves should be released pending trial on the extension petition. Otherwise, the defendant would be faced with the equally unacceptable choices of going to trial unprepared or being held without trial beyond the release date.

If prosecutorial delay causes prejudice to the defendant that does not deprive the defendant of a reasonable time to prepare for trial, the court must consider whether and what remedial action is required. First, the court must balance the explanation for the delay against the prejudice resulting from it. (Tatum, supra, 161 Cal.App.4th at pp. 60-61; Dougherty, supra, 143 Cal.App.3d at p. 249.) If the justification for the delay outweighs its prejudicial effect, the defendant may remain confined, pending trial, beyond the scheduled release date. If, however, good cause is not shown, or the good cause shown does not outweigh the prejudice suffered, the court must fashion a remedy.

A defendant released from commitment under the NGI or MDO statutes may, however, be subject to confinement under the LPS Act. A defendant who falls under the provisions of the LPS Act is held in a therapeutic setting and is entitled to the more stringent timeframes and procedural protections the LPS Act provides. This approach comports with the intent of the Legislature, honors due process, and ensures both that the defendant will be treated and the public protected. (See Allen, supra, 42 Cal.4th at pp. 105-107; Tatum, supra, 161 Cal.App.4th at p. 66; Hill, supra, 134 Cal.App.3d at p. 1060.)

In the future, those in defendant’s circumstances will be entitled to release at the end of their then current terms, subject to possible LPS Act proceedings, pending trial on their extension petitions.26 However, no relief is appropriate in this case. The court retained jurisdiction to try the petition. The trial, while untimely, was ultimately fair. Therefore, violation of the statutory timelines does not warrant reversal27

III. DISPOSITION

The judgment of the Court of Appeal is reversed.

George, C. 1, Kennard, 1, Werdegar, 1, Chin, 1, and Moreno, J., concurred.

Welfare and Institutions Code section 5000 et seq.

Penal Code section 1026. Outpatient treatment is another alternative. (Ibid.) Unless otherwise indicated, further statutory references will be to the Penal Code.

Section 1026, subdivision (e)(2).

Section 1026.5, subdivision (a)(1). References to section 1026.5 will sometimes be compressed by omitting the term “subdivision.”

Technically, once a defendant has been found not guilty by reason of insanity, he is no longer a criminal defendant, but a person subject to civil commitment. However, we will continue to use the word “defendant” to describe such a person, rather than the terms “committee” or “committed person.”

The prosecutor informed the court that he had belatedly found the petition in a pile of other reports. He admitted this explanation did not amount to a showing of good cause.

In re Lara (Dec. 6, 2004, S129957, H028038); Lara v. Superior Court (Dec. 6, 2004, S129957, H028039).

In re Lara (Feb. 16, 2005, S129957). Justices Kennard and Moreno were of the opinion that the petition should have been granted.

Moreover, since the proceeding challenged here, defendant has twice been recommitted. In the most recent proceeding of which we are advised, he filed a written waiver and acceptance of the extension.

In an order filed on June 28, 2007, defendant’s commitment was extended a second time, to October 15, 2008. In affirming the 2007 extension order, the Court of Appeal held: (1) Defendant continued to represent a substantial danger of physical harm to others because of his paranoid schizophrenia, the likelihood he would discontinue his medications if released, and his history of attempts to kidnap children. (2) Defendant’s jurisdictional challenge to the 2007 extension order, based on the ground that he was denied due process in the extension proceeding under review here, could not be resolved until we acted in this case. (People v. Lara (Aug. 27, 2008, H032069).) This court denied review in that case. (People v. Lara (Dec. 17, 2008, S167300).)

In an order filed on November 7, 2008, defendant’s commitment was extended a third time, to October 15, 2010. (People v. Lara (Super. Ct. Santa Clara County, 2008, No. C9803113).) Defendant filed a written waiver and acceptance of this extension.

We observed in People v. Allen (2007) 42 Cal.4th 91 [64 Cal.Rptr.3d 124, 164 P.3d 557] (Allen) that the violation of even a mandatory provision does not necessarily mean a court loses fundamental jurisdiction. (Id. at p. 101, fn. 5.) We need not consider the nature of those exceptions here, given our conclusion that the statutory deadlines were not mandatory. (See, ante, at p. 224.)

“Shall” is used in the provisions setting the time limits for (1) the medical director to submit an opinion to the district attorney concerning extension of the defendant’s commitment (§ 1026.5(b)(2)); (2) the district attorney to file an extension petition {ibid.): and (3) the trial to begin (§ 1026.5(b)(4)).

It is also used in subdivision (b)(10), which provides that extension proceedings “shall be conducted in accordance with the provisions of this subdivision.” (Italics added.)

Section 1026.5(a)(2), italics added.

Section 9603 of the Government Code provides: “The general rules for the construction of statutes are contained in the preliminary provisions of the different codes.”

Section 1026.5(a)(2), italics added.

“The petition shall be filed no later than 90 days before the expiration of the original commitment unless good cause is shown.” (§ 1026.5(b)(2), italics added.)

“The trial 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(b)(4), italics added.)

“|I]n reviewing the text of a statute, we must follow the fundamental rule of statutory construction that requires every part of a statute be presumed to have some effect and not be treated as meaningless unless absolutely necessary.” (People v. Arias (2008) 45 Cal.4th 169,180 [85 Cal.Rptr.3d 1, 195 P.3d 103].)

The primary purpose of confining a person under the authority of section 1026 is public protection. (Department of Mental Hygiene v. Hawley (1963) 59 Cal.2d 247, 255 [28 Cal.Rptr. 718, 379 P.2d 22].)

Defendant’s reliance on People v. Pacini (1981) 120 Cal.App.3d 877 [174 Cal.Rptr. 820] (Pacini) is also misplaced. Pacini involved a previous version of section 1026.5(b)(2) that did not provide for excusal of the filing deadline upon a finding of good cause. (Pacini, at p. 888, fn. 6; see People v. McCune (1995) 37 Cal.App.4th 686, 691 [43 Cal.Rptr.2d 804] (McCune).) Further, in that case, the district attorney filed an extension petition more than five weeks after Pacini’s “maximum commitment date” had passed. (Pacini, at pp. 881-882.) Because Pacini involved a case in which the commitment term had expired, the Pacini court noted that it was not determining “whether or under what conditions a violation of the ‘time limits’ of (b)(2) is jurisdictional.” (Id. at p. 891.)

In McCune, supra, 37 Cal.App.4th 686, a different panel of the same Court of Appeal that decided Pacini explained: “In Pacini, this court concluded that a failure to comply with the section 1026.5(b)(2) general requirement that an extension petition must be filed before the existing commitment period ends deprived the trial court of jurisdiction to extend the commitment. (120 Cal.App.3d at p. 891.) Because of this conclusion, it was unnecessary to consider whether the specific time limits in section 1026.5(b)(2) and (4)—respectively, the 90-day provision for petition filing and the 30-day provision for trial—were jurisdictional as well. (120 Cal.App.3d at p. 891.)” (McCune, at pp. 690-691.) The conclusion that section *2291026.5 requires filing of an extension petition before expiration of the existing term is consistent with our recent holding in Allen, supra, 42 Cal.4th 91, that a petition to extend the civil commitment of an MDO must be filed before the existing commitment expires. (Id. at p. 104.)

It is true that the Pacini court adopted the argument that the use of “this section” in section 1026.5(a)(1) was intended to refer to that subdivision only. (Pacini, supra, 120 Cal.App.3d at p. 890.) That statement, however, was dicta and, for the reasons set out above, is disapproved.

See, post, at page 236, footnote 26.

Like the NGI statutes, the MDO Act sets a 180-day deadline for the medical director to notify the district attorney whether the defendant’s term should be extended (§ 2970), and a 30-day deadline for beginning trial (§ 2972, subd. (a)). Unlike the NGI statutes, the MDO Act does not set a deadline for filing an extension petition. (Tatum, supra, 161 Cal.App.4th at p. 56.) Also, unlike section 1026, section 2970 does not expressly state whether its time limits are jurisdictional. (Fernandez, supra, 70 Cal.App.4th at p. 130.)

In Woodward, supra, 4 Cal.4th 376, this court ruled that the trial court’s failure to give the defendant advance notice of its intention to close the courtroom temporarily was a violation of procedural due process, but harmless beyond a reasonable doubt because there was nothing to suggest that the lack of notice prejudiced the defendant in any way, or that proper notice would have influenced or affected the course of the trial.

Section 1026.5(b)(4).

Section 1026.5(b)(2).

See, ante, at page 231, footnote 21.

As we have explained (see, ante, at p. 229), the following cases are disapproved insofar as they conclude that the appropriate remedy is, instead, dismissal of the extension petition: People v. Tatum, supra, 161 Cal.App.4th 41; People v. Dougherty, supra, 143 Cal.App.3d 245; People v. Hawkins, supra, 139 Cal.App.3d 984; People v. Hill, supra, 134 Cal.App.3d 1055.

Circumstances may be imagined in which reversal might be warranted. For example, if the prosecution negligently filed an extension petition so late that defense counsel did not have adequate time to prepare for trial before the expiration of the current term, and the court, nevertheless, refused to continue the trial. However, that is not the case we consider here.