The Spokane County Board of Commissioners appeals a declaratory judgment that the plaintiff class of all juveniles of compulsory school age who are or will be placed in the Spokane Juvenile Detention facility is entitled to education while in detention, and that such education shall be funded by the county.
We hold that, under the provisions of RCW Titles 13 and 28A, juveniles of school age have a right to education while detained in juvenile detention centers, both before and after adjudication and disposition. We hold further that the costs of providing such education to juvenile detainees should be included in the county budget as part of the cost of running the juvenile detention facility.
The named plaintiff, Tommy P., represents a class composed of all juveniles of compulsory school age who are now, or in the future will be, placed in the Spokane County Juvenile Detention Center. In June 1975, this class brought an action in Spokane County Superior Court against Spokane School District 81, the State Superintendent of Public Instruction, and Spokane County, for their failure to provide educational facilities, equipment, personnel, and other *387resources to members of the plaintiff class. The school district and the Superintendent of Public Instruction were dismissed from the action with prejudice in October 1976. In July 1976, the Spokane County Superior Court issued a preliminary injunction requiring the County to implement a preliminary education plan in its detention facility. The plan, which is still in effect pending this appeal, requires the hiring of an education specialist to conduct evaluation and assessment of each detainee within 3 days of his arrival at the facility, and to formulate an academic plan to assist the detainee in maintaining his performance level in the academic system. Special instruction and assistance are provided to those detainees who require it.
The hearing began in the Superior Court in June 1976. The plaintiffs called a number of witnesses with experience in dealing with juveniles in detention who testified to the need for an education program in the detention facility. The County called no witnesses. The court issued its declaratory judgment in January 1977. This declared that the plaintiff class has a right to treatment in the nature of education pursuant to the due process clause of the fourteenth amendment to the United States Constitution, the due process clause of the Washington Constitution, article 1, section 3, and the Washington Basic Juvenile Court Act, RCW 13.04. This judgment was appealed to this court, which remanded in December 1978 for further briefing and evidence on the effect on the need for education in detention facilities of the Juvenile Justice Act of 1977, RCW 13.40 (hereafter JJA), which took effect on July 1, 1978. Following this remand, the plaintiffs moved to reinstate Spokane School District No. 81 and the Superintendent of Public Instruction as defendants, and to join the State of Washington, the State Board of Education, and the Superior Court for Spokane County as defendants. The court allowed only the joinder of the Spokane County Superior Court and denied the reinstatement or joinder of the other parties. A consent order was subsequently entered providing that the Superior Court for Spokane County shall *388administer the provision of educational services to all children detained at the Spokane County Juvenile Detention Center.
The hearing on remand was held in June 1981. The plaintiffs produced evidence showing that the JJA significantly increased the time spent by juveniles in detention before disposition of their cases. The evidence also showed that education programs in detention not only improved the academic achievement of detainees, but also alleviated discipline and security problems in the facility, and even reduced the incidence of suicide attempts. The court entered findings and conclusions and issued another declaratory judgment. This judgment declared that the plaintiffs have a right to treatment in the nature of education pursuant to the due process clauses of the United States Constitution and the Washington Constitution, a statutory right to education pursuant to RCW 13.04, 13.40, and 28A.27, and a right to educational services pursuant to Const, art. 9, § 1. The findings, conclusions and judgment were appealed to this court.
Although the underlying issue throughout the litigation has always been the right of juvenile detainees to education, the County's approach to that issue has not been consistent. In appealing the trial court's 1977 declaratory judgment and findings and conclusions, the County raised only two issues:
1. Do juvenile detainees have either a constitutional or statutory right to "educational treatment" prior to an adjudication of either delinquency or dependency, which must be provided by the Board of County Commissioners?
2. Is there sufficient evidence to support the court's findings that:
Members of the plaintiff class, as juvenile detainees, have special educational needs requiring evaluative and remediative treatment and it is essential for the ultimate rehabilitation of the detainees that educational treatment be promptly provided. It must be provided soon after admission to the Detention Center.
*389There is no meaningful distinction in the need for educational treatment of the pre-adjudication and post-adjudication detainee. It is further shown that on some occasions pre-adjudication detainees are detained for lengthy periods of time, and this delay is the result of the needs of the juvenile court or the legal process. Average length of stay for all detainees is 4.71 days . . .
Significantly, the County assigned no error to the court's conclusion that defendant Spokane County is responsible to fulfill the detainees' right to educational treatment. Further, the brief of the County makes it clear that its objection to the two challenged findings was only that the record contained no evidence that educational evaluation and remediative treatment during preadjudicatory detention are essential for the ultimate rehabilitation of the detainee.
The County appeared to accept that it was responsible for providing education to postadjudicatory detainees, and its only contention was that this responsibility did not extend to preadjudicatory detainees. With the case in this posture, the court remanded for a further hearing on the effect of the JJA on the issue.
The County's position was reflected in the testimony which plaintiffs presented at the second hearing. Much of the testimony was directed towards establishing that under the JJA juveniles were detained longer before adjudication or disposition, and that such preadjudicated juveniles would benefit from education. In turn, this was reflected in the trial court's findings; the court essentially found that there was a need for educational treatment in detention, and that there was no meaningful distinction between preadjudicated and postadjudicated children in their need for education.
In appealing these findings and the second declaratory judgment, the County broadened its attack considerably. It asserted on its second appeal that "juvenile detainees" had no right to education or educational treatment under the due process clause of the federal and state constitutions, under article 9, section 1 of the Washington Constitution, *390or under RCW 13.04 and 13.40, and that even if detainees had such a right, it was not up to the counties to provide the education.
This procedural history is significant because it has created two areas of difficulty for the County on this appeal. First, the County presented no evidence to rebut the plaintiffs' showings of the need for education in detention, although there were two hearings on this issue. The County's argument that no juvenile detainee has a right to education was rather belatedly developed after the second hearing. Consequently, this argument is made in the face of uncontroverted testimony of various persons with experience in the juvenile detention system that education is necessary for juveniles in detention.
The second difficulty is the County's alternative argument that if juvenile detainees have a right to education, then the correlative duty to provide that education must rest on the state, rather than the counties. The County thereby seeks to avoid the duty of providing education to juvenile detainees (a duty it appeared to concede initially in the proceedings, at least in respect of postadjudicatory detainees) by shifting that duty to another party which had been dismissed with prejudice from these proceedings over 5 years before the present appeal.
The County would have us, therefore, decide this issue prejudicially to the state, but in the state's absence. Were we convinced by the County's arguments that the state, rather than the counties, is liable for the provision of education to detainees, we would have difficulty rendering in "equity and good conscience" a decision to that effect in the state's absence from these proceedings. CR 19; Aungst v. Roberts Constr. Co., 95 Wn.2d 439, 625 P.2d 167 (1981). Rather, we would be obliged to remand for such further proceedings as might be necessary for a complete adjudication of the issue. Cf. Automobile Club of Wash., Inc. v. Seattle, 49 Wn.2d 262, 300 P.2d 577 (1956). Thus, accepting the County's position would require us to remand for a second time, to require a third hearing in the trial court in *391proceedings which have already taken 7 years.
We find it unnecessary to further prolong this litigation in that way. Our interpretation of the provisions of RCW Titles 13 and 28A leads us to conclude that juveniles are entitled to education while in detention, and that the costs of such education should be provided by the county responsible for each detention center. We do not, however, decide the issue of whether the counties are entitled to recover from the state in whole or in part such costs of education.
Because we find the right of juveniles to education has a statutory foundation, we refrain from considering whether the right may also be based on the United States Constitution or this state's constitution. It is a well established principle that this court will not decide an issue on constitutional grounds when that issue can be resolved on other grounds. Senear v. Daily Journal-American, 97 Wn.2d 148, 641 P.2d 1180 (1982). Therefore, we confine ourselves to the juvenile detainees' right to education under the statutes of this state, and it is to this we now direct our attention.
Resolution of this issue turns on analysis of the intersection of two statutes: the common school provisions, RCW Title 28A, which provides for the education of every child in this state, and the Juvenile Justice Act of 1977, RCW 13.40, which provides inter alia for the handling, including detention, of juvenile offenders. In our analysis, we are guided by two venerable rules of construction. First, in interpreting a statute it is the duty of the court to ascertain and give effect to the intent and purpose of the Legislature, as expressed in the act. The act must be construed as a whole, and effect should be given to all the language used. Also, all of the provisions of the act must be considered in their relation to each other, and, if possible, harmonized to insure proper construction of each provision. Burlington N., Inc. v. Johnston, 89 Wn.2d 321, 572 P.2d 1085 (1977).
Second, it is the duty of the court to reconcile *392apparently conflicting statutes and to give effect to each of them, if this can be achieved without distortion of the language used. State v. Fagalde, 85 Wn.2d 730, 539 P.2d 86 (1975). The only way in which the provisions of Title 28A and those of Title 13 can be reconciled to give each the effect which the Legislature intended is to interpret RCW 28A.27 and RCW 13.40 as requiring the provision of a program of education in juvenile detention facilities.
RCW Title 28A embodies a clear legislative policy that to the greatest possible extent every child between the ages of 8 and 15 in the state of Washington be provided with education. The compulsory school attendance law, RCW 28A-.27.010, mandates that
All parents, guardians and the persons in this state having custody of any child eight years of age and under fifteen years of age shall cause such child to attend the public school of the district in which the child resides for the full time when such school may be in session or to attend a private school for the same time . . .
This is crucial to the public school system established by RCW Title 28A. This system is provided for in RCW 28A.02.010.
A general and uniform system of public schools embracing the common schools shall be maintained throughout the state of Washington in accordance with Article IX of the state Constitution.
The "common schools" which form this public school system are defined in RCW 28A.01.060 as:
schools maintained at public expense in each school district and carrying on a program from kindergarten through the twelfth grade or any part thereof including vocational educational courses otherwise permitted by law.
The broad import of these provisions is that all children in the state are required to attend a school maintained at public expense unless they choose to attend a private school. The statutes recognize the critical importance of providing education to every child in the state, a duty the constitution of this state recognizes as paramount. Const. *393art. 9, § 1.
As might be expected, the exceptions to the requirement that all children in the state attend public or private school are narrowly drawn. These exceptions, classifying children who are not required to attend public school, are set out in RCW 28A.27.010. The school district superintendent may excuse from attendance at school any child who falls within one of three categories: First, a child who is physically or mentally unable to attend school; second, a child who is attending a residential school operated by the Department of Social and Health Services; and third, a child who is specially excused for purposes agreed to by the school authorities and the parent, guardian, or custodian of the child. Excused absences in the third category shall not be permitted if they would cause a "serious adverse effect" upon the student's educational progress.
Thus, any child who is physically and mentally able to attend school is required to do so, unless the child is specially excused by the school authorities for a specifically agreed purpose and his absence would not cause a serious adverse effect upon his progress, or unless he is attending a residential school.
"Residential schools" are those schools, camps and centers established by the Department of Social and Health Services for the diagnosis, confinement, and rehabilitation of juveniles committed by the courts or for the care and treatment of persons who are exceptional in their needs by reason of mental and/or physical deficiency. RCW 28A.58-.770.
A program of education is provided in residential schools which includes:
(a) Not less than one hundred and eighty school days each school year;
(b) Special education pursuant to chapter 28A. 13 RCW, . . . and vocational education, as necessary to address the unique needs and limitations of residents; and
(c) Such courses of instruction and school related student activities as are provided by the school district for *394nonresidential school students to the extent it is practical and judged appropriate for the residents . . .
RCW 28A.58.772(4). Juveniles who are committed by the courts to residential schools are therefore excused from attendance at public schools because they are provided not only equivalent education to that provided in the public schools, but also special education to address their unique needs and limitations.
Juveniles in detention facilities other than the residential schools, however, are not specifically exempted from the compulsory school attendance law. Therefore, if such juvenile detainees are excluded from the ambit of the compulsory school attendance law, such exclusion must be found elsewhere. However, the only other statute which bears, even peripherally, on this question is the JJA. And a review of both the practical effect of and the stated policies and purposes of that act convinces us that, rather than excluding juvenile detainees from education, it requires education to further its policies.
We begin our review of the JJA by considering the findings of the trial court on the impact of the JJA on juvenile detention centers. The trial court recognized four classes of detainees at the Spokane facility. (1) Children held after arrest and before a detention hearing. (2) Children held after a detention hearing but before adjudication of guilt and/or disposition (sentencing). (3) Children sentenced to up to 30 days' detention at the facility. (4) Children committed to the Department of Social and Health Services for up to 6 months who are placed at the Spokane Juvenile Detention facility pursuant to a contract between the Department and the facility.
The latter group has been limited by a recent statutory provision. RCW 13.40.185 was enacted in 1981 to provide that all terms of confinement over 30 days are under the supervision of DSHS, but that if confinement is for more than one offense but the confinement for each offense is less than 30 days, then at the discretion of the court the sentences may be served in facilities operated by a county. *395Presumably, therefore, most sentences over 30 days will now be served in residential schools operated by DSHS. Most juvenile detainees in county facilities, therefore, will be predisposition detainees and those serving short-term sentences.
The major impact of the JJA has been on the length of time served by detainees prior to disposition of their cases. The trial court made findings from statistical data collected at the Spokane Juvenile Detention facility and which may be summarized thus. Predisposition detainees are detained much longer under the new juvenile code because much more formal procedures are followed prior to and in all phases of the adjudicatory and dispositional hearings. Under the previous legislation, predisposition detention averaged 4.71 days; under the JJA, predisposition detention averages 18 days. More than 70 percent of detainees are held 10 days or longer, and up to 90 days prior to disposition. Predisposition detainees formed the majority of the population at the Spokane facility. Prom July 1980 until May 1981, predisposition detainees comprised up to 75 percent of the population at the Spokane facility (excluding children detained under contract with DSHS). Approximately 75 percent of juveniles detained prior to disposition are released on the day of disposition because their sentences are credited in total to time already served. The average time spent in the education program at the Spokane facility increased from 8.8 days in 1979 to 12.5 days in 1981.
In summary, the JJA has created a new group of detainees who are withheld from the common school system for a significant length of time, and who are not provided with the alternative education programs available to detainees in residential schools.
The record makes abundantly clear that this new group of detainees is in urgent need of education. We are convinced by this record that an education program can provide significant benefits for detainees within a few days of their detention. An education specialist can quickly conduct *396tests to evaluate the child and determine whether the child is academically deficient and, if so, in what areas. Following such assessment and evaluation, remedial programs can be begun at once to improve the child's basic skills in reading, spelling, and math, in order to bring the child up to the level of his peers in school. In this way, deficiencies which may not have been recognized by the public school system (which is limited by having to deal with large numbers of students) can be diagnosed and remedied by an education program in detention tailored specifically to the child's needs. The trial court made an unchallenged finding that teachers in the Spokane facility were able to teach basic educational skills and raise the detainees' achievement levels approximately 3 years in reading, 1 year in spelling, and 1 year in math. Moreover, achievements of the education program are not limited to these spectacular results in remediation. Juveniles can be introduced in detention to vocational programs which they might pursue once out of detention. Furthermore, the classroom is a familiar milieu for juveniles, and the education program aids adjustment to detention by providing familiar classroom experiences in detention. By occupying and stimulating detainees, the education program improves security and discipline and is even effective in reducing attempts at suicide.
In the light of this record it seems abundantly clear that there are very good reasons the mandate of the compulsory education law should reach children in county detention facilities. There are no explicit provisions in the compulsory education law excepting such detainees from the reach of that law. And certainly nothing in the JJA suggests that the compulsory education law should not apply to children in detention. In fact, quite the reverse is true.
The provision of education will further the policies and purposes of the JJA. These purposes and policies are set out in RCW 13.40.010(2). Therein are stated 2 policies which underlie the act and 10 purposes which are designed to effectuate these policies.
The policies are, first, to establish a system capable of *397having primary responsibility for, being accountable for, and responding to the needs of youthful offenders; and second, that youths be held accountable for their offenses and that both communities and the juvenile courts carry out their functions consistent with this intent.
As we recognized in In re Smiley, 96 Wn.2d 950, 952, 640 P.2d 7 (1982), the JJA replaced the doctrine of parens patriae as the single guiding principle of juvenile justice and replaced it with twin principles of rehabilitation and punishment. While the provision of education in detention may not be essential to achieve the punishment (accountability) policy of the act, it is certainly necessary to achieve the rehabilitation (response to the needs of youthful offenders) policy.
The testimony in the proceedings before the trial court clearly indicated that juvenile offenders are in special need of education in detention. An ¿specially eloquent statement of this is in the deposition testimony of an experienced teacher who worked for several years at the Spokane County Juvenile Detention facility. The witness said of the need for education in detention:
For many youngsters it means the difference between whether or not they will go on and get a GED certificate and become self-sufficient adults ... or whether they're going to be delinquents and eventually be in jail or prison even . . .
It also gives them a feeling of achievement, of success. Most of them have never had that feeling, that I can succeed or can do something. They get so tickled when they get a good score on a paper or when they pass a test just as though it is the first time in their life it has happened to them, and that feeling of achievement is something that we all need desperately, but these children more than anybody else because it is something that they have missed out on so many times in the past.
From this and other testimony in the record it appears clear to us that the provision of education in detention is a particularly effective response to a critical need of juvenile offenders, and an important step in achieving the rehabili*398tation of a juvenile offender. Education, therefore, may reasonably be considered an aspect of the "treatment" which the act intends that juvenile offenders be provided. Two of the 10 purposes enumerated in RCW 13.40.010(2) refer to treatment. Subsection (f) provides that a purpose of the JJA is to "[pjrovide necessary treatment, supervision, and custody for juvenile offenders" and subsection (j) states the purpose to " [pjrovide for a clear policy to determine what types of offenders shall receive punishment, treatment, or both." If treatment is to be provided in response to the needs of the offender in accordance with the policy of the act, then that treatment must include education, because education is one of the most urgent needs of many juvenile offenders.
We are convinced, therefore, by these statements of policy and purpose, that the JJA is not intended to create an exception to the compulsory education law. The fact of detention will prevent effect being given to the letter of the compulsory education law, in that a juvenile detainee's parent or custodian will be unable to cause that child to attend a public school. However, the underlying intent of the compulsory education law, of providing every child in the state with education, can just as readily be achieved by the provision of education facilities within the detention center. This effectuates not only the policy of the compulsory education law, but also the policy of the JJA of responding to the needs of juvenile offenders. We hold, therefore, that the compulsory education law requires the provision of a program of education in juvenile detention centers. While we do not attempt to specify the content of such a program of education, it should reasonably address the special needs of juvenile offenders and the policy of the Legislature of rehabilitating such offenders into productive members of society.
We now turn to the issue of the source of funding for the education programs to be provided in county detention facilities. The several counties are responsible for providing and maintaining houses of detention. RCW 13.04.135, first *399enacted in 1913, provides:
Counties containing more than fifty thousand inhabitants shall, and counties containing a lesser number of inhabitants may, provide and maintain at public expense, a detention room or house of detention, separated or removed from any jail, or police station, to be in charge of a matron, or other person of good character, wherein all children within the provisions of this chapter shall, when necessary, be sheltered . . .
Apparently, the counties did not respond to RCW 13.04-.135 with alacrity because in 1945 the Legislature recognized a lack of detention facilities in the various counties, and declared in RCW 13.16.020 that this constituted an emergency. RCW 13.16.030 provides:
The construction, acquisition and maintenance of juvenile detention facilities for dependent, wayward and delinquent children, separate and apart from the detention facilities for adults, is hereby declared to be a mandatory function of the several counties of the state.
RCW 13.16.040 authorized the counties to declare an emergency and appropriate sufficient funds to meet all demands for adequate care of dependent, delinquent and wayward children. However, it specifically limited expenditure of such emergency appropriations to
the acquisition, purchase, construction or leasing of real and personal property and the employment and payment of salaries for an adequate staff of juvenile officers and necessary clerical staff and assistants and for furnishing suitable food, clothing and recreational facilities for dependent, delinquent and wayward children.
The counties, therefore, have a clear statutory duty to provide funding for the provision and maintenance of detention facilities.
Juvenile detention services are "administered" by the superior court in all counties except class AA counties. RCW 13.04.035. Class AA counties are counties with populations of more than 500,000. RCW 36.13.010. In class AA counties, juvenile detention services are managed by a board of managers appointed by the superior court. RCW *40013.20.010. The juvenile court board of managers is required to prepare, in accordance with county budget law, and file with the county auditor, a detailed and itemized estimate of all expenditures required for the rendition of services under the jurisdiction of the board of managers. RCW 13.20.040(3).
Although the Legislature does not specify in any detail the duties of the superior court in administering juvenile detention facilities in counties other than class AA, it is reasonable to expect that similar budgetary procedures are followed by the superior courts of those counties in administering detention facilities.
Our holding that education must be provided in juvenile detention facilities, therefore, requires that estimated expenditures for such education services must be included in the budgets for detention service presented to the several counties. However, although the county is thus immediately responsible for the provision of funds for education services, we do not wish to preclude the possibility of funds for such services being provided from outside the county. For example, RCW 13.16.050 provides:
In connection with the financing of facilities and the employment of a staff of juvenile officers for dependent, delinquent and wayward children, the various boards of county commissioners affected shall attempt to secure such advances, loans, grants in aid, donations as gifts as may be secured from the federal government or any of its agencies or from the state government or from other public or private institutions or individuals.
Moreover, RCW 13.06.040 and .050 provide for payments from the State to counties based on the counties' performance in reducing the commitment rate of juveniles. WAC 275-32-065(e), promulgated pursuant to RCW 13.06.050, provides that counties may claim funds under RCW 13.06 to reimburse expenditures directly utilized for special supervision programs for specified purposes. Among those purposes specified is detention care reasonably necessary to *401achieve rehabilitation and which includes a substantial element of special services and/or a program in addition to routine supervision and care. Possibly expenditure for education programs in detention might be recoverable under this provision.
Such determinations are beyond the scope of the present appeal, and are noted only to emphasize that we do not intend to preclude the counties' pursuing such alternative sources of funds for the provision of educational services in detention.
The declaratory judgment is accordingly affirmed only insofar as it is consistent with this opinion.
By supplemental brief, respondents claim attorney fees pursuant to 42 U.S.C. § 1983. Since our decision does not grant relief under section 1983, since no other law has been asserted which would warrant an award of attorney fees, and since the request was not timely made in accordance with RAP 18.1, respondent's request for attorney fees is denied.
Brachtenbach, C.J., and Rosellini, Stafford, Utter, Dolliver, Williams, and Dimmick, JJ., concur.