
263 N.W.2d 874 (1978)
The PEOPLE of the State of South Dakota in the Interest of C. E. B., a minor, and concerning Jerry Burrow and Verna Burrow.
No. 12164.
Supreme Court of South Dakota.
March 20, 1978.
Ronald E. Brodowicz, Asst. Public Defender, Rapid City, for appellant.
Janice C. Godtland, Asst. Atty. Gen., Pierre, for respondent; William J. Janklow, Atty. Gen., Pierre, on the brief.
ANDERST, Circuit Judge.
This is an appeal from a juvenile disposition. We affirm in part, reverse in part and remand.
A petition was filed with the court alleging that C.E.B. was a delinquent child in that among other criminal violations, he had committed the offense of third-degree burglary of a vehicle. At the adjudicatory hearing, C.E.B. admitted that the allegations of the petition charging him with committing the offense of third-degree burglary were true. The court found that the admission was voluntarily entered, and that the allegations of the petition were supported by evidence beyond a reasonable doubt, and entered its order adjudicating C.E.B. to be a delinquent child.
C.E.B. and his mother waived their right to a continuance and asked that the dispositional hearing be held immediately. After hearing statements from all concerned parties, the court entered its order of disposition. The parts of the court's order pertinent to this appeal are as follows:

*875 [S]aid [C.E.B.] is committed to Detention for ninety (90) days and that on his eighteenth (18) birthday March 9, 1977 he will be moved downstairs to finish said sentence. It is further ordered that upon his release from jail, [C.E.B.] is on probation for one year . . .
The record discloses that C.E.B. was kept in the juvenile section of the county jail until March 9, 1977, when he was transferred to the adult section of the jail, where he remained until release on bail by this court pending the outcome of his appeal.
On appeal, two issues are raised: (1) Does the juvenile court retain jurisdiction over a juvenile after he reaches age eighteen? (2) Does the juvenile court have authority to place a juvenile in detention by a decree of disposition?
Juvenile procedure is a creature of statute. The court in juvenile proceedings has only that jurisdiction and authority granted to it by the legislature. The South Dakota legislature in 1972 lowered the age of majority of males from twenty-one to eighteen years. SDCL 26-1-1. Similar lowering of the age of majority in Iowa, Flowers v. Haugh, 207 N.W.2d 766 (1973); Arizona, Hoover v. Dept. of Corrections, 109 Ariz. 485, 512 P.2d 594 (1973); New Mexico, In re Doe, 85 N.M. 691, 516 P.2d 201 (1973); and Wisconsin, State ex rel. Johnson v. Hershman, 55 Wis.2d 499, 200 N.W.2d 65 (1972) resulted in the juvenile courts losing jurisdiction when the minor reached the age of majority. Appellant urges us to follow this line of decisions. In reviewing these, cases and others cited as authority, in each instance the statutory limit of jurisdiction of the juvenile court was lowered by the appropriate state legislature. Such is not the case in South Dakota. Our legislature, in SDCL 26-8-7, has defined "delinquent child" as "any child ten years of age or older . . ." Further, SDCL 26-8-1(3) defines child as "a person less than eighteen years of age, and any person under twenty-one years of age under the continuing jurisdiction of the court, or who is before the court for an alleged delinquent act committed prior to his eighteenth birthday." Appellant further argues, and cites SDCL 26-8-47 and 26-8-49 as authority for the proposition, that the legislative intent was that the jurisdiction of the juvenile court is to terminate on the child's eighteenth birthday unless the custody of the child has been changed by a prior court order. SDCL 26-8-1(4) defines the word "commit" to mean transfer of legal custody. In the case of State v. Batterman, 79 S.D. 191, 199, 110 N.W.2d 139, 143 (1961), we set out the rule of pari materia as follows:
". . . Under this rule . . . where several legislative acts are part of the same system of laws . . . they must be construed in pari materia. . ." 50 Am.Jur., Statutes § 420, p. 442.
"The object of the rule of pari materia is to ascertain and carry into effect the intention of the legislature. It proceeds upon the supposition that the several statutes were governed by one spirit and policy, and were intended to be consistent and harmonious in their several parts and provisions. 50 Am.Jur., Statutes, § 348."
In reading the several statutes together, the law seems clear in South Dakota. If the juvenile court obtains jurisdiction before a person's eighteenth birthday, or as the result of an act of juvenile delinquency committed before a person's eighteenth birthday, as long as the court retains continuing jurisdiction over that person, such jurisdiction lasts until that person reaches twenty-one years of age. Herein, the court obtained jurisdiction over C.E.B. before his eighteenth birthday, and therefore could retain continuing jurisdiction over him until he reaches age twenty-one.
Once a child has been adjudicated as being delinquent, the decree of disposition must contain one or more of the provisions of SDCL 26-8-39 or 26-8-40.1. In the instant case the court's decree of disposition, among other things, placed the juvenile in detention for ninety days. Detention is defined by SDCL 26-8-1(7) as "the temporary care of a child who requires secure custody in physically restricting facilities pending court disposition or an execution of a court order for placement or commitment." Detention is a temporary decree and not a final disposition provided by statute.
*876 The court not having statutory authority to make such a disposition, it is invalid.
Juvenile dispositions are to serve the best interests of the child and the public. That the judge herein at the time of disposition had these criteria in mind is without dispute. The record discloses that C.E.B. has a long juvenile history, with prior dispositions placing him in informal adjustment, work details, formal probation and commitment to the Youth Forestry Camp. None of these appeared to have worked. However, while in juvenile detention, he was released for schooling and he earned his GED. Further, since his release on bail, he has not been in trouble. Generally in cases like this we would remand to the trial court for further disposition not inconsistent with our opinion; but with this background, we conclude that the juvenile court has accomplished the purpose of its dispositional plan. We therefore remand the matter to the trial court with directions to immediately discharge C.E.B. and terminate its jurisdiction over him.
All the Justices concur.
ANDERST, Circuit Judge, sitting for ZASTROW, J., disqualified.
