
691 N.W.2d 550 (2005)
13 Neb. App. 287
In re INTEREST OF E.M., alleged to be a mentally ill dangerous person.
State of Nebraska, appellee,
v.
E.M., appellant.
No. A-04-484.
Court of Appeals of Nebraska.
January 18, 2005.
*553 Dennis R. Keefe, Lancaster County Public Defender, Dorothy A. Walker, and Sarah P. Newell, Senior Certified Law Student, for appellant.
Gary Lacey, Lancaster County Attorney, Krista Hendrick, and Julie Agena, Senior Certified Law Student, for appellee.
INBODY, Chief Judge, and IRWIN and CARLSON, Judges.
IRWIN, Judge.

I. INTRODUCTION
E.M. appeals from an order of the district court in which the court found him to be a mentally ill dangerous person and found that inpatient treatment is the least restrictive treatment alternative for him. On appeal, E.M. asserts that he was denied his statutory right to have a hearing within 7 days of being taken into custody, see Neb.Rev.Stat. § 83-1045.02 (Reissue *554 1999), and that there was insufficient evidence to support the court's findings. We find that the statutory language governing the time for hearings is directory, not mandatory, and that there was sufficient evidence to support the court's findings. As such, we affirm.

II. BACKGROUND
E.M. was convicted of sexually assaulting a child in 1996. E.M. was sentenced to inpatient treatment and was in inpatient treatment between May 1996 and November 2001. After completing that inpatient treatment, E.M. voluntarily signed himself into a voluntary transition program in which he received further inpatient treatment between November 2001 and October 2002. E.M. was then discharged into the community and admitted into an outpatient "aftercare" program. In December 2002, E.M. discontinued his involvement with the outpatient aftercare program, contrary to the recommendations of the program facilitators.
On April 8, 2003, the Lancaster County Attorney filed a petition before the Lancaster County Mental Health Board (the board) alleging that E.M. was a mentally ill dangerous person presenting a substantial risk of serious harm to himself or another person. The petition further alleged that a "mental-health-board-ordered treatment disposition" would be the least restrictive treatment alternative for E.M. Attached to the petition was an affidavit from Dr. Steven B. Blum, the consulting psychologist from the outpatient aftercare program. Dr. Blum indicated that E.M. had reported he had previously victimized numerous children by sexual assault (which had led to his confinement beginning in 2001), that E.M. had reported a return to various behaviors which were part of his prior pattern of child sexual assault, that E.M. had discontinued attending the aftercare program without the approval of the aftercare program workers, and that E.M. was at high risk to reoffend.
On April 17, 2003, the board entered an order of commitment. E.M. had appeared before the board and admitted the allegations of the petition. E.M. stipulated that he was a mentally ill dangerous person and that he posed a substantial risk of harm to others. The court found that at that time, the least restrictive treatment alternative for E.M. was commitment to an outpatient program. As such, the board ordered E.M. committed to an outpatient aftercare program for sex offenders. The terms of the outpatient treatment plan included requirements that E.M. attend aftercare meetings every Saturday, that E.M. attend either Alcoholics Anonymous or Narcotics Anonymous meetings once per week, that E.M. abstain from the use of alcohol or drugs, and that E.M. have no contact with minors. The treatment plan further indicated that E.M.'s failure to comply with the terms of the plan would result in a request for inpatient treatment for him.
The record reveals that within 2 weeks of the April 17, 2003, outpatient commitment order, E.M. reported using methamphetamine, having minors in his residence, and only sporadically attending Alcoholics Anonymous or Narcotics Anonymous meetings. E.M.'s last attendance at an aftercare meeting occurred in July 2003. At some point, E.M. left Lancaster County and moved to Hayes Center, Nebraska, to be closer to other family members. The record indicates that there are no outpatient services for E.M. in the geographic area of Hayes Center.
On September 17, 2003, the Lancaster County Attorney filed a motion before the board asking the board to reexamine E.M.'s outpatient commitment. The motion contained allegations that E.M. was not complying with the terms of the April *555 17 commitment order and that the least restrictive treatment alternative for him was inpatient treatment. Attached to the motion was an affidavit from Dr. Blum in which he indicated that E.M. had missed 2 weekly aftercare meetings in July and had attended no aftercare meetings since July; that E.M. had had no contact with group facilitators since July; that E.M. had reported using methamphetamine, having minors in his apartment, and inconsistently attending Alcoholics Anonymous or Narcotics Anonymous meetings; that E.M. was no longer living at his registered residence; and that E.M. was at significant risk to reoffend.
E.M. was taken into custody on September 17, 2003, pursuant to an emergency protective custody order (EPC). The record is not clear about the genesis of the EPC. The Lancaster County sheriff took custody of E.M. in Hayes Center on September 18 and transferred E.M. to Lancaster County.
On September 25, 2003, the board held a hearing on the motion to reexamine E.M.'s outpatient commitment order. At that hearing, E.M. sought to have the proceedings dismissed, alleging that he had been held in custody for more than 7 days without a hearing and that such violated § 83-1045.02. The board overruled E.M.'s motion.
The board received evidence, including testimony concerning E.M.'s failure to comply with the outpatient commitment order. The board heard testimony that since E.M.'s release from inpatient treatment, he had violated most of the coping skills and relapse prevention techniques taught in the inpatient program, and that he was at high risk to relapse and reoffend. The board also heard testimony that inpatient treatment was necessary because E.M. had been afforded numerous opportunities and guidance for outpatient treatment, but that his refusal to comply with terms of voluntary and board-ordered treatment necessitated inpatient treatment. Further, the board heard testimony that E.M. posed a continued danger to minors and that there was a risk that he would reoffend "in the near future." E.M. argued to the board that the outpatient treatment had been effective because he had not actually reoffended since being released from inpatient treatment.
On September 26, 2003, the board entered an order of commitment. The board found that E.M. had failed to comply with the terms of the previous outpatient commitment order, that he remained a mentally ill dangerous person, and that he posed a substantial likelihood of danger to others. The board specifically found that the hearing was conducted within 7 days of E.M.'s being taken into custody. The board ordered that E.M. be committed to inpatient treatment.
E.M. appealed the board's order to the district court. On March 23, 2004, the district court entered an order, finding no merit to E.M.'s argument concerning the timing of his hearing. The district court also found clear and convincing evidence to support the board's finding that E.M. is a mentally ill dangerous person, that he suffers from pedophilia, and that he poses a substantial risk of harm to others. The district court further noted that E.M. had stipulated to being a mentally ill dangerous person who poses a substantial risk of harm to others. The district court affirmed the board's finding that inpatient treatment is the least restrictive treatment alternative for E.M. This appeal followed.

III. ASSIGNMENTS OF ERROR
On appeal, E.M. has assigned two errors. First, E.M. asserts that the district court erred in finding that he was not denied his statutory right to a hearing *556 within 7 days of being taken into custody. Second, E.M. asserts that the district court erred in finding sufficient evidence to support the board's findings.

IV. ANALYSIS

1. STANDARD OF REVIEW
The district court reviews the determination of a mental health board de novo on the record. In re Interest of Kochner, 266 Neb. 114, 662 N.W.2d 195 (2003). In reviewing a district court's judgment in mental health commitment proceedings, appellate courts will affirm the district court's judgment unless, as a matter of law, the judgment is unsupported by evidence which is clear and convincing. See, id.; In re Interest of S.B., 263 Neb. 175, 639 N.W.2d 78 (2002).

2. HEARING WITHIN 7 DAYS
E.M. first asserts that he was confined for more than 7 days before being afforded a hearing and that such confinement violated the statutory mandate of § 83-1045.02. At trial, E.M. sought to have the proceedings dismissed because of this alleged violation, but the board overruled his motion. The district court found that the statutory provision had not been violated. We conclude that the statutory language at issue in § 83-1045.02 is directory, not mandatory, because of the purposes of the provision and the lack of a remedy for violation of the provision, and that we therefore need not determine whether the provision was violated on the facts of this case. We note, however, that this is a case of first impression concerning whether the language in § 83-1045.02 is directory or mandatory.
Section 83-1045.02 authorizes a mental health board to conduct a hearing to review whether a patient previously committed to outpatient treatment can be adequately served by the outpatient plan or whether outpatient treatment needs to be continued, modified, or ended. Section 83-1045.02 also authorizes a mental health board to issue a warrant directing any law enforcement officer to take the subject into custody pending a hearing. Section 83-1045.02 provides that "[n]o person may be held in custody pending the hearing for a period exceeding seven days except upon a continuance granted by the board."
In the present case, E.M. was taken into custody on September 17, 2003. The record indicates that a law enforcement officer took E.M. into custody on that date pursuant to an EPC. On September 18, the Lancaster County sheriff took custody of E.M., served upon E.M. notice that a motion had been filed for review of his outpatient commitment order, and transported E.M. from Hayes Center back to Lancaster County. The hearing was held on September 25.
The State argued to the board that the EPC was on an "unrelated" matter. The State thus argued that E.M. was not taken into custody pursuant to the board's warrant in this matter until September 18, 2003. E.M. attempted to offer into evidence before the board a copy of the EPC upon which E.M. was taken into custody on September 17. The board, however, found that the EPC was "not relevant" to the proceedings, apparently concluding that the EPC was not relevant to determining whether E.M. was taken into custody on September 17 pursuant to the present proceedings or because of an unrelated matter. E.M. made an offer of proof that the EPC was based upon information from Dr. Blum, who was involved in the present case, concerning E.M.'s participation in outpatient treatment, and that "the matters are totally interrelated."
We initially note that E.M. has not appealed the board's decision denying admission *557 of the EPC into evidence. As such, the merits of that decision are not properly before us, and there is no evidence before us from which we can determine that the board erred in finding that the EPC was unrelated. More importantly, however, we conclude that the "seven days" language of § 83-1045.02 is directory, not mandatory, and that even assuming the provision was violated in this case, violation of the provision does not mandate dismissal of the proceedings.
There is no universal test by which directory provisions of a statute may be distinguished from mandatory provisions. Randall v. Department of Motor Vehicles, 10 Neb.App. 469, 632 N.W.2d 799 (2001). As a general rule, in the construction of statutes, the word "shall" is considered mandatory and inconsistent with the idea of discretion. Id. In the present case, the word "shall" is not used, but we agree with E.M. that the phrase "no person may be held in custody" is comparable in meaning and effect to saying that the State "shall not hold a person in custody."
Nonetheless, while the word "shall" may render a particular statutory provision mandatory in character, when the spirit and purpose of the legislation require that the word "shall" be construed as permissive rather than mandatory, such will be done. Id. The Nebraska Supreme Court has found on many occasions that time limitation language in statutes are directory rather than mandatory, despite the use of the word "shall."
One test relied on by the Nebraska Supreme Court to determine whether a statutory provision is mandatory or directory is as follows:
"`If the prescribed duty is essential to the main objective of the statute, the statute ordinarily is mandatory and a violation will invalidate subsequent proceedings under it. If the duty is not essential to accomplishing the principal purpose of the statute but is designed to assure [sic] order and promptness in the proceeding, the statute ordinarily is directory and a violation will not invalidate subsequent proceedings unless prejudice is shown.' " State v. $1,947 in U.S. Currency, 255 Neb. 290, 297, 583 N.W.2d 611, 616-17 (1998), quoting Matter of Sopoci, 467 N.W.2d 799 (Iowa 1991). Accord Randall v. Department of Motor Vehicles, supra. Further, a legislative enactment providing that an act be accomplished within a specified time period, with no sanction for failure to comply with that mandate, is directory. Randall v. Department of Motor Vehicles, supra.

In the present case, the prohibition on holding a person in custody for more than 7 days before a hearing is not essential to the main objective of § 83-1045.02. The main objective of that statute is to review the effectiveness of outpatient treatment and make a determination of whether outpatient treatment continues to be a viable option for a mentally ill dangerous person. In § 83-1045.02, it is clear that the time specification is designed to ensure order and promptness in the proceeding. Further, there is no provision anywhere in that statute which provides a sanction for failure to comply with the time specification.
The facts of the present case indicate that E.M. was, at the longest, held in custody for 1 day more than allowed under § 83-1045.02. This determination assumes that the EPC was not entirely unrelated to the present proceeding, a determination we assume for purposes of argument but expressly do not find. There is no indication in the record that E.M. suffered any prejudice as a result of this 1 day delay, and he received a *558 prompt hearing on the matter. Further, it is apparent that the time specification in this case should be considered directory and not mandatory precisely because there is no effective sanction for noncompliance. Were we to accept E.M.'s position that the proceedings should have been dismissed, there is nothing whatsoever which would have prevented the board from dismissing the proceeding and, at the same time, issuing a new warrant and ordering that E.M. be taken back into custody immediately. While not ruling upon the propriety of such a theoretical action, under that scenario and pursuant to the new warrant, E.M. could actually have been held in custody for another 7 days before a hearing was held. For all these reasons, we conclude that E.M.'s assignment of error in this regard is meritless.

3. SUFFICIENCY OF EVIDENCE
E.M. next asserts there was insufficient evidence to support the findings that he is a mentally ill dangerous person and that inpatient treatment is the least restrictive treatment alternative for him. Because we do not find the district court's judgment to be, as a matter of law, unsupported by clear and convincing evidence, we find no merit to E.M.'s assertion.
Under the Nebraska Mental Health Commitment Act, the State has the burden of establishing by clear and convincing evidence the defendant's mental illness and dangerousness. See In re Interest of S.B., 263 Neb. 175, 639 N.W.2d 78 (2002). Before a person may be committed for treatment by a mental health board, the board must determine that the person meets the definition of a mentally ill dangerous person as set out in Neb.Rev.Stat. § 83-1009 (Reissue 1999). In re Interest of Kochner, 266 Neb. 114, 662 N.W.2d 195 (2003). To meet that definition of a mentally ill dangerous person, the State must show that the person suffers from a mental illness and that the person presents a substantial risk of harm to others or to himself or herself. Id.
In the present case, we note first that E.M. appeared before the board on April 17, 2003, and stipulated that he was, at that time, a mentally ill dangerous person. After that time, E.M. failed to comply with the terms of his outpatient commitment and essentially received almost no further treatment which would bear on his condition at the time of the hearing on September 25 to reassess his condition and the terms of his commitment.
In addition, the board was presented with testimony from Dr. Blum, the consulting psychologist who had worked with the aftercare program E.M. had been ordered to participate in. Dr. Blum noted that E.M.'s history included a wide range of male and female child victims, poor impulse control, substance abuse, and the use of drugs and alcohol to "groom" potential victims. See id. (history even prior to incarceration may be probative in determining if there has been recent overt act upon which to base finding of dangerousness). Dr. Blum further testified that in the months prior to the September 25, 2003, hearing, E.M. had self-reported experiencing sexual attraction to minors in his presence; had self-reported having minors in his residence and in his presence; had self-reported using drugs and alcohol in the presence of minors; had failed to consistently participate in treatment, both voluntarily and after being ordered by the board to do so; had only sporadically attended Alcoholics Anonymous or Narcotics Anonymous meetings, even after being ordered by the board to do so; and had moved to an area where there were no outpatient services available. On this record, we cannot say that the district court *559 was wrong as a matter of law in finding clear and convincing evidence that E.M. is a mentally ill dangerous person.
In addition, the record presented to us makes it clear that the district court was not wrong as a matter of law in finding that inpatient commitment is the least restrictive treatment alternative for E.M. After being released from his previous involuntary commitment, E.M. failed to continue voluntary treatment even though he was advised to do so. After being committed to an outpatient treatment program, E.M. violated every condition of the outpatient plan within 3 months. There is nothing in the record to indicate that anything short of inpatient commitment would be successful in treating E.M. As such, we find E.M.'s assertion in this assignment of error to be without merit.

V. CONCLUSION
We find no merit to E.M.'s assertions on appeal. The district court's order is affirmed.
AFFIRMED.
