
238 Wis.2d 216 (2000)
2000 WI App 162
617 N.W.2d 230
IN RE the COMMITMENT UNDER CHAP. 980, STATS. OF Wilbert L. THOMAS:
STATE of Wisconsin, Petitioner-Respondent,[]
v.
Wilbert L. THOMAS, Respondent-Appellant.
No. 00-0150.
Court of Appeals of Wisconsin.
Submitted on briefs May 18, 2000.
Decided July 12, 2000.
*218 On behalf of the respondent-appellant, the cause was submitted on the briefs of Jack E. Schairer, assistant state public defender of Madison, Mark Lukoff, assistant state public defender of Racine, and Robert W. Peterson, assistant state public defender of Racine.
On behalf of the petitioner-respondent, the cause was submitted on the brief of Brian E. Pawlak, assistant district attorney, and Robert S. Flancher, district attorney of Racine.
Before Brown, P.J., Anderson and Snyder, JJ.
¶ 1. ANDERSON, J.
In this interlocutory appeal, Wilbert L. Thomas argues that the circuit court erred by not granting his motion to dismiss a December 28, 1999 petition seeking his commitment as a WIS. STAT. ch. 980 (1997-98)[1] sexually violent person. Thomas argues that the petition should have been dismissed for not conforming to the time limit in WIS. STAT. § 980.02(2)(ag) because it was filed after he had been discharged from his criminal sentence for a sexually violent offense. After reviewing the statute, we agree *219 and conclude that an offender cannot be detained beyond his or her maximum discharge date in order to file a ch. 980 petition. The order is reversed.
¶ 2. Thomas was convicted of second-degree sexual assault on March 31, 1992, and sentenced to serve eight years in prison. His mandatory release date was December 23, 1997. After a psychological evaluation prior to his release, the evaluating psychologist determined that Thomas did not meet the criteria for WIS. STAT. ch. 980 commitment, and therefore the Department of Corrections (DOC) declined to request that such petition be filed. The Racine district attorney's office had another psychological evaluation conducted and, after the psychologist recommended that it do so, filed a petition on December 8, 1997, to commit Thomas under ch. 980. Thomas moved to dismiss the petition, asserting that the district attorney did not have authority to file a petition unless the DOC had requested that the petition be filed and the Department of Justice (DOJ) had declined to do so. The court denied Thomas's motion, and we reversed that decision in State v. Thomas, No. 98-0152, unpublished slip op. (Wis. Ct. App. Dec. 9, 1998), aff'd, 231 Wis. 2d 241, 603 N.W.2d 84 (1999) (per curiam), where we held that a district attorney may file a commitment petition only if the DOJ has declined to do so following a DOC request.
¶ 3. On December 8, 1999, the supreme court affirmed our decision. See State v. Thomas, 231 Wis. 2d 241, 603 N.W.2d 84 (1999) (per curiam). After the deadline for filing a motion for reconsideration had passed, the supreme court remitted the case to the circuit court. Thomas's maximum discharge date was December 25, 1999. On December 29, 1999, the circuit court dismissed the December 8, 1997 petition.
*220 ¶ 4. While the 1997 petition was in the appeal process, another psychological examination of Thomas was conducted. Based on the psychologist's conclusions, the DOC changed its view and determined that the criteria for a WIS. STAT. ch. 980 commitment had been established. It wrote a December 9, 1999 letter to the DOJ requesting that it file such a petition. The DOJ once again declined to do so in a December 22 letter to the Racine county district attorney. The district attorney responded by filing a second petition for ch. 980 commitment on December 28.
¶ 5. The next day, Thomas filed a motion to dismiss the second petition, arguing that the district attorney lacked authority to file it. At the motion hearing, Thomas pointed out that his discharge date was December 25, 1999, and the second petition was filed on December 28. This is contrary, he contended, to the requirement in WIS. STAT. § 980.02(2)(ag) that the petition be filed within ninety days of release or discharge. He further argued that the only reason he remained in custody beyond this date was that the WIS. STAT. ch. 980 petition, a civil matter, was in the appeal process; his criminal sentence, however, was completed. His motion was denied. Thomas appeals.
¶ 6. A WIS. STAT. ch. 980 petition may be filed "within 90 days of discharge or release, on parole, extended supervision or otherwise, from a sentence that was imposed for a conviction for a sexually violent offense, from a secured correctional facility." WIS. STAT. § 980.02(2)(ag). The parties disagree about whether the December 28, 1999 petition filed against Thomas was timely filed. On the one hand, Thomas contends that § 980.02(2)(ag) requires that the petition be filed within ninety days of his discharge. Because his discharge *221 date,[2] December 25, had passed, there was no authority to file the petition and it should be dismissed, he argues. The State, on the other hand, asserts that the time limit is not mandatory and that the term "otherwise" in § 980.02(2)(ag) is a catchall provision designed by the legislature to cover instances such as this.
[1, 2]
¶ 7. To resolve this dispute, we must examine WIS. STAT. § 980.02(2)(ag) and determine which party construes it correctly. This is a question of statutory interpretation, which we review without deference to the circuit court's conclusion. See Grosse v. Protective Life Ins. Co., 182 Wis. 2d 97, 105, 513 N.W.2d 592 (1994). If the language of the statute is clear and unambiguous, we merely apply the language to the facts of the case. See State v. Keding, 214 Wis. 2d 363, 368-69, 571 N.W.2d 450 (Ct. App. 1997).
¶ 8. The State first argues that it did not lose authority to file a WIS. STAT. ch. 980 petition against Thomas because the time limit in WIS. STAT. § 980.02(2)(ag) is directory rather than mandatory. Section 980.02(2) prescribes:
A petition filed under this section shall allege that all of the following apply to the person alleged to be a sexually violent person:

*222 . . . .
(ag) The person is within 90 days of discharge or release ... from a sentence that was imposed for a conviction for a sexually violent offense. . . . (Emphasis added.)
[3, 4]
¶ 9. The State contends that despite the "shall" directive in WIS. STAT. § 980.02(2), the time limit remains directory. "Although the use of the word `shall' in a statute suggests that the provision is mandatory, this court has often held that statutory time limits are directory despite the use of the word `shall.'" State v. R.R.E., 162 Wis. 2d 698, 707, 470 N.W.2d 283 (1991). In determining whether the statutory time limit is mandatory, we consider several factors: the existence of penalties for failure to comply with the limitation, the statute's nature, the legislative objective for the statute, and the potential consequences to the parties, such as injuries or wrongs. See State ex rel. Lockman v. Gerhardstein, 107 Wis. 2d 325, 329, 320 N.W.2d 27 (Ct. App. 1982).
¶ 10. In R.R.E., the supreme court considered whether R.R.E. was entitled to release from his not guilty by reason of mental disease or defect commitment when the circuit court failed to conduct his reexamination hearing within the statutory thirty-day time limit. See R.R.E., 162 Wis. 2d at 703. The statute at issue, WIS. STAT. § 51.20(16)(c) (1987-88), required that "a hearing shall be held on the petition within 30 days of receipt." (Emphasis added.) In holding that the time limits were directory, the R.R.E. court found that when creating the criminal commitment provisions, the legislature's objectiveprotecting the public from a dangerous individualwas the dominant consideration. See R.R.E., 162 Wis. 2d at 709, 712.
*223 [5]
¶ 11. The same policy consideration was an impetus for the creation of WIS. STAT. ch. 980. See State v. Carpenter, 197 Wis. 2d 252, 271, 541 N.W.2d 105 (1995) ("[T]he principal purposes of ch. 980 are the protection of the public and the treatment of convicted sex offenders. . . ."). It is important, however, to highlight that the legislature's primary focus in creating ch. 980 was not to further criminally punish convicted sexually violent persons, but to provide treatment to them for their mental conditions. See Carpenter, 197 Wis. 2d at 273-74. A ch. 980 commitment is a civil one, not a criminal one as in R.R.E. Although the legislature's goals in enacting WIS. STAT. § 980.02(2)(ag) were similar to those analyzed in R.R.E., this important factual distinction exists. That being the case, we determine that the most appropriate comparison is to another decision, Gerhardstein, dealing with the statutory time limit for a commitment hearing in an involuntary civil commitment situation.
[6]
¶ 12. The Gerhardstein court determined that the statutory time limit in WIS. STAT. § 51.20(7)(c) (1981-82) was mandatory. In that case, the statute required that the circuit court, if it determines that probable cause exists, shall schedule a final commitment hearing within fourteen days of the person's involuntary commitment. See Gerhardstein, 107 Wis. 2d at 329. Focusing on the injuries suffered by an individual held in custody beyond the statute's time limit for a hearing, the court concluded that "an individual . . . who is incarcerated and deprived of [his or] her liberty until the holding of a final commitment hearing, is injured to a[] . . . great[] degree." See id. at 330. We find this reasoning applicable to the present issue and *224 determine that the time limit in WIS. STAT. § 980.02(2)(ag) is mandatory.
[7]
¶ 13. Our decision today is supported by the recent supreme court decision, State v. Thiel, 2000 WI 67, 235 Wis. 2d 823, 612 N.W.2d 94. The Thiel court held that WIS. STAT. § 980.02(2) requires that "the State must prove beyond a reasonable doubt that it filed its [commitment] petition within 90 days of the subject's release or discharge." Thiel, 2000 WI 67 at ¶ 26. The court found that the statute's plain language led it to the "inescapable conclusion" that "the legislature intended the State to prove its fulfillment of the 90-day requirement beyond a reasonable doubt before a person may be adjudged sexually violent." See id. at ¶ 19. Because proving that the commitment petition was filed within ninety days of discharge or release is an essential allegation in the petition, it follows that the time limit of § 980.02(2)(ag) must be mandatory.
¶ 14. The State alternatively argues that the term "otherwise" in WIS. STAT. § 980.02(2)(ag) refers to a generalized concept of custody, meaning that so long as Thomas was continuously detained, for whatever reason, the paragraph applies. It relies on State v. Keith, 216 Wis. 2d 61, 71-72, 573 N.W.2d 888 (Ct. App. 1997), to support its contention. We cannot agree that Keith stands for this proposition. The Keith court considered when a WIS. STAT. ch. 980 petition should be filed if the offender is continuously incarcerated under consecutive sentences. See Keith, 216 Wis. 2d at 70. The court determined that the petition could be filed within ninety days of the offender's release from a continuous term of incarceration, any part of which was imposed for a sexually violent offense. See id. at 71.
¶ 15. The State insists that:

*225 Mr. Thomas at the time of the filing of the petition was held in the custody of the Racine County Jail as a result of his sexual assault conviction, his ancillary chapter 980 proceeding, and finally Remittitur. This qualifies under the "otherwise" provision of the statute.
¶ 16. Although the lawfulness of Thomas's continued detention after his discharge date is not at issue here, the State argues that his continued detention equates with the "generalized concept of custody" approved by the court in Keith. See id. at 72. We disagree, finding the situation in Keith factually dissimilar. Keith served consecutive sentences of incarceration; Thomas did not. The authority to keep Thomas in jail beyond his discharge date is not found in WIS. STAT. ch. 980. He could not be criminally detained under ch. 980 because such persons are civil patients, not prisoners. See Carpenter, 197 Wis. 2d at 271-72. Thomas's continued detention beyond his discharge date is excluded from the WIS. STAT. § 980.02(2)(ag) provision permitting petitions to be filed against those "otherwise" detained for a conviction for a sexually violent offense.
¶ 17. In sum, we conclude that WIS. STAT. § 980.02(2)(ag) is clear and unambiguous. It requires that a petition can only be filed within ninety days of a defendant's release or discharge from a criminal sentence for a sexually violent offense. See Keith, 216 Wis. 2d at 71-72; Thiel, 2000 WI 67 at ¶ 26. This did not happen. The petition against Thomas was filed three days after he was discharged from his criminal sentence. The State does not point to an administrative code section or statute allowing it to detain Thomas beyond his sentence's discharge date in order to file a WIS. STAT. ch. 980 petition, and we hold that it was without authority to do so.
*226 ¶ 18. We reached an analogous result in State ex rel. Olson v. Litscher, 2000 WI App 61, 233 Wis. 2d 685, 608 N.W.2d 425. In that case, Olson was detained past his mandatory release date because the State was still trying to find a neighborhood willing to accept him as a paroled sex offender. See id. at ¶ 5. We determined that the statute was cleara person must be released on his or her mandatory release date.
[T]here is no gray area in the statuteit is crystal clear. Our job is to apply the statute as it is written. Whether or not a place has been found for an inmate, he or she must be released on his or her mandatory release date.
Id.
[8]
¶ 19. Unlike a mandatory release situation where an inmate's sentence technically continues while on parole, a discharge date signals the end of a criminal sentence. Once an inmate has reached his or her discharge date, the appropriate amount of time has been served and the inmate should be released from custody. The DOC's authority over that person has ceased. Just as we have held it to be unlawful to hold an inmate beyond mandatory release to find placement according to the requirements in WIS. STAT. § 301.45, we likewise hold that an inmate cannot be held beyond his or her discharge date while the State pursues a WIS. STAT. ch. 980 commitment. WISCONSIN STAT. § 980.02(2)(ag) does not permit this.
By the Court.Order reversed.
NOTES
[]  Petition to review denied.
[1]  All references to the Wisconsin Statutes are to the 1997-98 version unless otherwise noted.
[2]  WISCONSIN STAT. § 980.02(2)(ag) refers to both release and discharge dates. One is entitled to mandatory release from prison on parole when two-thirds of his or her sentence is served. See WIS. STAT. § 302.11(1). After reaching his or her mandatory release date, one remains on parole until the maximum discharge date or the date on which the sentence would have been completed without the application of the mandatory release provision. See 73 Wis. Op. Att'y Gen. 81-82 (1984).
