delivered the opinion of the court:
The State took a juvenile into custody and charged him with being a delinquent, but failed to hold a hearing within 36 hours to justify his detention. Instead, it obtained a continuance to a more convenient date. The juvenile was entitled to release once the State failed to give him a prompt hearing within the 36 hours specified by statute. The statutory mandate is clear and should have been followed.
Darrell Clayborn was taken into custody on Friday, May 30, 1980, at about 2 p.m. A petition for adjudication of wardship was filed immediately. The next day he was taken before a judge who scheduled a detention hearing for Monday, June 2,1980. On that day the State told the court that its witness, a police officer, was unavailable but could appear *1049the next day. Over Clayborn’s objection, the court continued the detention hearing until Tuesday, June 3, 1980.
Clayborn received a detention hearing on June 3,1980, at about 11:20 a.m. Probable cause was found. The next day he filed a writ of habeas corpus which was denied after a hearing by the circuit court. Clayborn remained in custody. On June 17,1980, an adjudicatory hearing was held at which Clayborn was found to be a delinquent. On July 16,1980, he was released from custody and placed on one year’s probation.
The pertinent provisions of the Juvenile Court Act provide:
“A law enforcement officer may, without a warrant, take into temporary custody a minor (a) whom the officer with reasonable cause believes to be [delinquent].” Ill. Rev. Stat. 1979, ch. 37, par. 703-4.
“[A] probation officer * * * shall immediately investigate the circumstances of the minor and the facts surrounding his being taken into custody. The minor shall be immediately released to the custody of his parent * * * unless the probation officer * * * finds that further detention is a matter of immediate and urgent necessity for the protection of the minor or of the person or property of another * * *.
The written authorization of [the probation officer] constitutes authority for the superintendent of a detention home or * * * a county or municipal jail to detain and keep a minor for up to 36 hours, excluding Saturdays, Sundays and court-designated holidays.” Ill. Rev. Stat. 1979, ch. 37, par. 703 — 4.
“(1) Unless sooner released, a minor * * * taken into temporary custody must be brought before a judicial officer within 36 hours, exclusive of Saturdays, Sundays and court-designated holidays, for a detention hearing * * * to determine whether he shall be further held in custody. * * *
(3) * * * When a parent * * * is present and so requests, the detention * * * hearing shall be held immediately if the court is in session, otherwise at the earliest feasible time. * * *
(4) The minor must be released from custody at the expiration of the 36 * * * hour period * * * if not brought before a judicial officer within that period.” (Ill. Rev. Stat. 1979, ch. 37, par. 703-5(1), (3), (4).)
The provisions must be interpreted in light of the purpose of the Act, which is to serve the welfare of the minor and the best interests of the community, to preserve family ties by giving preferential treatment to parental custody and to secure to the minor at least the procedural rights afforded adults. Ill. Rev. Stat. 1979, ch. 37, par. 701 — 2.
The provisions for a prompt detention hearing fulfill the requirement *1050imposed by article I, section 7 of the Illinois Constitution of 1970. They offer the juvenile more protection than adults, for the Act mandates immediate release from custody when the right to a prompt probable cause review is denied. Where adults are concerned, however, there is no remedy for a violation of article I, section 7. People v. Howell (1975), 60 Ill. 2d 117, 123, 324 N.E.2d 403, 406.
The Juvenile Court Act defines with precision what constitutes a prompt detention hearing. A minor must be taken before a judge for a detention hearing within 36 hours of being taken into custody. The Act makes allowance for delays when the courts are not in session, and so in fact a juvenile might have to wait more than 36 hours for a detention hearing. In this case, for example, Clayborn might have properly been in custody for many more than 36 hours before his detention hearing, since he was in custody over a weekend. But the essential point of the statute is clear: a minor must be taken before a judge for a detention hearing within the first 36 hours the courthouse doors are open after he is taken into custody.
The State argues that any appearance before a judge satisfies the statute. But the Act does not require meaningless appearances in court. It requires that the minor be taken before a judge so that the circumstances of his detention can be reviewed and probable cause established. It requires a hearing. See Ill. Rev. Stat. 1979, ch. 37, par. 703 — 6, for the specifics of the hearing.
The 36-hour limitation is not merely directory. The provision of the Juvenile Court Act that requires that the adjudicatory hearing be held within 30 days was found to be directory in In re Armour (1974), 59 Ill. 2d 102, 319 N.E.2d 496. That provision states that the petition “shall be set for an adjudicatory hearing within 30 days.” (Ill. Rev. Stat. 1979, ch. 37, par. 704 — 2.) Armour noted that “shall” can mean either “may” or “must” and held that the legislature intended that it mean “may.” No such analysis is possible here. The Act says that the minor “must be brought before a judicial officer within 36 hours.” (Emphasis added.) (Ill. Rev. Stat. 1979, ch. 37, par. 703 — 5(1).) The literal wording of the statute must be respected. In addition, unlike in Armour, there is a remedy provided for a violation of the mandate of this provision — “the minor must be released from custody.” The existence of the remedy lends support to the conclusion that the 36-hour limitation is mandatory.
The State argues that literal compliance means that a detention hearing would have to have been held at 2 a.m. on June 3. No such result is required. The detention hearing does not have to be held at the end of 36 hours of custody, only before 36 hours have elapsed. The legislature did not mean to put the circuit court to an impossible task, but only to provide for prompt detention hearings. It felt that 36 hours was adequate *1051time to prepare for and provide a detention hearing. The State’s suggestion that substantial compliance with the limitation is enough if the delay beyond 36 hours is reasonable is not a sound interpretation of the statute.
Given the policy of the Act to keep the minor in parental custody, the constitutional requirement of a prompt hearing for any detention and the unavailability of bail in the juvenile court, there are strong policy arguments for strict compliance with the Act. There might be instances in which substantial compliance would have to be tolerated, such as where the normal functioning of the courts break down. But that is not the case here. The only reason for the continuance in this case was the temporary unavailability of the State’s witness. The State concedes that its witness, a police officer, could have come to court the next day, but it gives no reason for his unavailability on the scheduled date of Clayborn’s detention hearing. More than the convenience of the State’s witnesses is required to justify a delay in a minor’s detention hearing.
All that remains to consider is the proper remedy for the delay. The defendant argues that because the State failed to hold a detention hearing within the proper time it should not have been allowed to hold him in custody at all before the adjudicatory hearing. Significantly, the defendant does not challenge the juvenile court’s jurisdiction to hold the adjudicatory hearing or place him on probation. It has already been held that violation of this statute does not deprive the court of jurisdiction over the minor. In re Nyce (1971), 131 Ill. App. 2d 481, 486, 268 N.E.2d 233, 236; People v. Dean (1977), 52 Ill. App. 3d 383, 386, 367 N.E.2d 419, 422; In re Daniels (1976), 37 Ill. App. 3d 975, 977, 347 N.E.2d 479, 480.
Instead, the defendant asks this court to interpret section 3 — 5(4) of the Act, providing that the minor “must be released from custody.” (Emphasis added.) (Ill. Rev. Stat. 1979, ch. 37, par. 703 — 5(4).) Custody is the important term. Two interpretations are possible: one is that the legislature intended that when a detention hearing is delayed too long, the juvenile is to be released but only until the delayed detention hearing is held. The second interpretation is that the legislature intended that the juvenile not be held in custody at all prior to the adjudicatory hearing,
The latter interpretation is the more reasonable. The Act nowhere authorizes a detention hearing after the 36-hour limitation has expired. Section 3 — 5(4), like sections 4 — 2 and 5 — 3(4), mandates a maximum period of time that a minor may be held in custody pending judicial action, (in re Daniels, 37 Ill. App. 3d 975, 977, 347 N.E.2d 479, 480.) To adopt the former interpretation would be to increase the amount of overall time a minor spends in custody while awaiting adjudication and disposition of the petition of wardship. The latter interpretation encourages the State to make up for the delay in holding a detention hear*1052ing. If the State wishes to keep a minor off the street, it will schedule the adjudicatory hearing at the earliest possible moment, thus vitiating the earlier delay in holding a detention hearing. The statutory policy favoring prompt juvenile proceedings is served by construing section 3 — 5(4) to ban any further detention after a violation of the 36-hour period of section 3-5(1).
When Clayborn petitioned for a writ of habeas corpus, he should have been released. The juvenile court erred in denying the petition. However, since then Clayborn’s adjudicatory hearing has been held and he has been released from custody. The issue of his detention is therefore moot. This opinion, nevertheless, is authorized by the public interest exception to the general rule that a moot case will be immediately dismissed. (People ex rel. Wallace v. Labrenz (1952), 411 Ill. 618, 622, 104 N.E.2d 769, 772.) The detention of a juvenile is a matter of public concern, and an authoritative determination of the issue will guide public officials and juvenile court judges who are likely to face the problem in the future. See In re Johnson (1977), 53 Ill. App. 3d 921, 925, 369 N.E.2d 70, 73; Kraut v. Rochford (1977), 51 Ill. App. 3d 206, 217, 366 N.E.2d 497, 505; Johnson v. Board of Education (1967), 79 Ill. App. 2d 22, 25, 223 N.E.2d 434, 436.
McGILLICUDDY, P. J., and McNAMARA, J., concur.