OPINION
¶ 1 On May 10, 1993, Adam M. pleaded no contest in children’s court to numerous delinquency charges including first degree murder, conspiracy to commit first degree murder, aggravated burglary, conspiracy to commit aggravated burglary, and larceny. The amended petition alleged that Adam M. committed these acts on February 7, 1993, eight days after his fourteenth birthday. The children’s court judge adjudicated Adam M. a delinquent child and transferred legal custody of Adam M. to the New Mexico Youth Authority (now the Children, Youth and Families Department) (Department) for an indeterminate period not exceeding two years. Upon the State’s motions, the children’s court extended Adam M.’s custody for a period of one year on April 7, 1995, and again on April 2,1996.
¶2 The State filed a motion for a third one-year extension of custody on March 11, 1997, after Adam M. had turned eighteen. The children’s court denied the motion, concluding that it no longer had jurisdiction to grant an extension under the statute in effect at the time of the delinquent acts because Adam M. had reached his eighteenth birthday. The State appeals the children’s court’s order, and we affirm.
Applicable Statute
¶ 3 At the time of the' offenses, the Children’s Code adopted in 1981 (1981 Code) was in effect. The legislature revised the Children’s Code in 1993 (1993 Code). This revision took effect July 1, 1993, after the offenses in question.
¶4 The State contends that the Children’s Code in force at the time of its requested extension applies to its motion rather than the 1981 Code, which was the law when Adam M. committed the delinquent acts. The 1993 Code allows for the extension of jurisdiction of the children’s court to age twenty-one, as discussed later in this opinion. The State argues this position based on the premise that under the Children’s Code, the court transfers legal custody of a delinquent child to the Department as opposed to sentencing the child as an adult. See NMSA 1978, § 32-1-34(E)(2) (1992) (current version at NMSA 1978, § 32A-2-19(B)(2)(b) (1996)) see generally Health & Social Servs. Dep’t v. Doe,
¶ 5 One of the express purposes of the Children’s Code is to provide supervision, care, and rehabilitation to a child adjudicated delinquent. NMSA 1978, § 32-1-2(B) (1989) (current version at NMSA 1978, § 32A-2-2(A) (1993)). The legislature has also declared its purpose to provide effective deterrence to acts of juvenile delinquency. Section 32-1-2(F) (current version at § 32A-2-2(B)). To fulfill these purposes under the 1993 Code, the children’s court may transfer legal custody of an adjudicated delinquent offender to the Department which, to supervise and rehabilitate the child, may place the child in a long-term commitment for up to two years in a long-term facility. Section 32A-2-19(B)(2)(b). The children’s court had similar alternatives under the 1981 Code. Sections 32-1-34(E)(2); -38(A).
¶ 6 The United States Supreme Court has considered the commitment of delinquent children to be “a deprivation of liberty ... incarceration against one’s will, whether it is called ‘criminal’ or ‘civil.’ ” In re Gault,
¶ 7 Article II, Section 19 of the New Mexico Constitution and Article I, Section 10 of the United States Constitution prohibit the New Mexico legislature from enacting ex post facto laws. State v. Norush,
¶ 8 One of the purposes of the ex post facto prohibition is to ensure that the accused individual receives fair notice of the crime and its punishment. See Weaver v. Graham,
¶ 9 Adam M.’s plea was an integral part of the adjudicatory proceedings. See In re Gault,
¶ 10 If we allowed subsequent legislation to enlarge the period of commitment, we would render undeterminable an essential ingredient of the plea decision. Notice, as guaranteed children in adjudicatory proceedings by Gault,
¶ 11 We are guided in our decision by analogous case law from another jurisdiction. In a nearly idential situation, the Washington Supreme Court reached the same result. See Johnson v. Morris,
Interpretation of 1981 Code
¶ 12 The history of the Children’s Code provisions concerning extensions of commitments is pertinent to the State’s argument. In 1972, the legislature adopted the following provisions:
F. Prior to the expiration of a judgment transferring legal custody the court may extend the judgment for an additional period of one year if it finds that the extension is necessary to safeguard the welfare of the child or the public interest.
H. When a child reaches eighteen years of age all judgments affecting the child then in force automatically terminate, except that an agency to which the legal custody of an adjudicated delinquent child has been transferred for care and rehabilitation may request the court that made the original transfer of custody for authority to retain legal custody of the child for a period not to extend beyond the child’s twenty-first birthday. The request by the agency shall be made by filing a petition and the petition must be filed before the child’s eighteenth birthday____If the court finds on the basis of clear and convincing evidence, competent, material and relevant in nature, that the child is in need of further care and rehabilitation, it may extend the agency’s legal custody to a date not extending beyond the child’s twenty-first birthday.
1972 N.M.Laws, ch. 97, § 35. 1
¶ 13 When the legislature revised the Children’s Code in 1981, it did not change Subsection F. However, it revised Subsection H to read: “When a child reaches eighteen years of age, all neglect and abuse orders affecting the child then in force automatically terminate.” 1981 N.M.Laws, ch. 36, § 29. That revision remained in effect until 1993. See NMSA 1978, § 32-1-38(H) (1992).
¶ 14 In 1993, after the offenses occurred in this case, the legislature made a substantial revision to the Children’s Code. It adopted a provision concerning extensions of long-term commitments reading:
D. Prior to the expiration of a long-term commitment, as provided for in Section 32[A]-2-19 NMSA 1978, the court may extend the judgment for additional periods of one year until the child reaches the age of twenty-one, if the court finds that the extension is necessary to safeguard the welfare of the child or the public interest.
F. Prior to the expiration of a judgment of probation, the court may extend the judgment for an additional period of one year until the child reaches the age of twenty-one, if it finds that the extension is necessary to protect the community or to safeguard the welfare of the child.
1993 N.M.Laws, ch. 77, § 52 (codified as amended at NMSA 1978, § 32A-2-23(D), (E) (1995)).
¶ 15 The judiciary’s responsibility when interpreting a statute is to carry out the intent of the legislature. See Cummings v. X-Ray Assocs., 1996 NMSC 035, ¶44,
¶ 16 By its very nature, the 1981 Code (and its predecessors and successor) focused on children. See generally § 32-1-2 (current version at NMSA 1978, § 32A-1-3 (1993)). The legislative purpose with regard to delinquent children is to provide “a program of supervision, care and rehabilitation” for children consistent with the protection of the public interest. Section 32-1-2(B) (current version at § 32A-2-2(A)). A “child” is defined in all versions of the Children’s Code since 1972 2 as “an individual who is less than eighteen years old.” NMSA 1978, § 32A-1-4(B) (1995); NMSA 1978, § 32-1-3(A) (1992).
¶ 17 When we view the 1981 Code, as amended through 1992, in its entirety, we do not see any reference to extending a commitment for an adjudicated delinquent child after the child has reached eighteen. Section 32-1-38(F) provides no such authority. It permits the children’s court to extend a judgment transferring legal custody for additional periods of one year. It does not, as did its predecessors or does its successor, permit the court to order an extension until the child reaches the age of twenty-one. The plain language of the 1981 Code simply does not mention any age other than eighteen.
¶ 18 In the pre-1981 Code, Section 32-1-38(H) mandated the automatic termination of children's court judgments when a child turned eighteen, with one exception. It permitted extensions of legal custody of adjudicated delinquent children until age twenty-one and protected them from automatic termination at age eighteen. The legislature made substantial changes to that section in 1981. It eliminated all reference to the legal custody of adjudicated delinquent children and enacted language that spoke only to neglect and abuse orders which would automatically terminate when a child reaches eighteen years of age.
¶ 19 The State argues that when the legislature became silent concerning extensions of legal custody for children adjudicated delinquent who have reached age eighteen, it continued to intend to permit the children’s courts to extend custody as authorized by the earlier Children’s Code until such children reached twenty-one. The State asks us to read into the 1981 Code the language which the legislature deleted.
¶20 In making this argument, the State first contends that if the legislature intended to terminate all orders affecting children when they reach eighteen, the legislature could have expressly written such termination into Subsection H so that the plain language of the statute would indicate the legislative intent. We are unable to reach this conclusion. The legislative action in 1981 specifically removed express language which continued the children’s courts’ authority to extend commitment until age twenty-one. We cannot ignore this legislative action. If the legislature did not intend to change the law, why did it amend the language of Subsection H? The amendment entirely changed the subsection; it was not a stylistic change. We cannot assume that the legislature enacts useless statutes or amendments. Leyba v. Renger,
¶ 21 Nor can we accept the State’s position that the legislature committed a mere oversight with its 1981 Code and subsequent revisions which it then clarified years later under the 1993 Code. The courts “presume that the [legislature knows the law and acts rationally.” Bybee v. City of Albuquerque,
¶ 22 The State further argues that when the changes to Subsection H are read in conjunction with other sections of the 1981 Code, there is no intent “to lower all age limits to 18 or to deprive the children’s court of jurisdiction of anyone over 18.” Section 32-1-12(A) provided that children’s courts’ jurisdiction over a child automatically terminates when the child becomes an adult, “except that jurisdiction is retained until disposition of a case involving a child who becomes an adult during the pendency of the proceedings pursuant to the Children’s Code.” NMSA 1978, § 32-1-12(A) (1981). Rather than see a conflicting provision, we read this provision in correlation with Section 32-1-38. The word “disposition” was used in the 1981 Code to refer to the action taken at the adjudicatory hearing. The Section 32-1-12(A) exception applied when a child, under the age of eighteen by the Children’s Code definition, became an adult before the dispositional judgment in the proceeding. See NMSA 1978, §§ 32-1-33 (1972), -34(A); In re John Doe,
¶23 We also read the automatic termination of all abuse and neglect orders at age eighteen to be consistent with the children’s court’s holding. The abuse and neglect provision of the 1981 Code applies to children in need of proper parental care. See NMSA 1978, § 32-1-3(L), (M) (1992) (definitions of “neglected child” and “abused child”) (current version at NMSA 1978, § 32A — L-2(B), (C) (1997)). A person reaching the age of majority no longer requires parental care.
¶24 We lastly address the State’s intimation that the legislature did not intend to amend Subsection H in 1981 to limit the age of a child when an extension of custody can be requested, thus leaving the age limit for extensions open-ended. Such an intent would permit a children’s court to extend custody of the Department for adults over age eighteen annually ad infinitum. But by their express purposes, the Department and its facilities are not designed for adults. See NMSA 1978, §§ 32A-2-4, -12 (1993). We do not adopt an interpretation of a statute that leads to absurd results. Chavez v. Mountain States Constructors, 1996 NMSC 070, ¶24,
Conclusion
¶25 In summary, we affirm the children’s court order that the children’s court lacked jurisdiction to extend the confinement of Adam M. beyond his eighteenth birthday. The Children’s Code in effect at the time of occurrence of the delinquent acts did not provide for jurisdiction past the age of eighteen. The children’s court is a court of limited jurisdiction, and “it is only permitted to do what is specifically authorized by the statute.” In re Angela R.,
¶ 26 IT IS SO ORDERED.
Notes
. A provision allowing the juvenile (now children’s) court to retain jurisdiction of a juvenile until age twenty-one also existed in the Public Welfare Code, which authorized creation of the juvenile courts in 1965. See NMSA 1953, § 13-8-29 (1965).
. Since 1929, the statutory provisions focusing on delinquent children have defined “juvenile” or "child” as a person less than eighteen years of age. NMSA 1953, § 13-14-3(A) (1973); NMSA 1953, § 13-8-20(d) (1955); NMSA 1941, § 44-101 (1929).
