
    [S.F. No. 24273.
    Nov. 9, 1981.]
    In re RICKY H., a Person Coming Under the Juvenile Court Law. THE PEOPLE, Plaintiff and Respondent, v. RICKY H., Defendant and Appellant.
    
      Counsel
    Quin Denvir, State Public Defender, under appointment by the Court of Appeal, Richard E. Shapiro and Mark L. Christiansen, Deputy State Public Defenders, for Defendant and Appellant.
    Wilbur F. Littlefield, Public Defender (Los Angeles), Kenneth I. Clayman and Jack T. Weedin, Deputy Public Defenders, as Amici Curiae on behalf of Defendant and Appellant.
    George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Robert D. Marshall and Paul V. Bishop, Deputy Attorneys General, for Plaintiff and Respondent.
   Opinion

BIRD, C. J.

Appellant Ricky H., a minor, appeals from an order of the superior court declaring him to be a ward of the juvenile court and committing him to the California Youth Authority. Appellant contends that the Youth Authority commitment was an abuse of discretion because the judge did not give adequate consideration to less restrictive alternatives such as placement in the local county youth center. He also challenges the superior court’s denial of credit for actual time spent in juvenile hall prior to his commitment and for “conduct credits” of the kind provided for by statute (Pen. Code, § 4019) and by decisional law (People v. Sage (1980) 26 Cal.3d 498 [165 Cal.Rptr. 280, 611 P.2d 874]) for adults incarcerated in county facilities.

I.

The issues on appeal concern the orders made by the superior court at appellant’s dispositional hearing on December 13, 1978. Two separate petitions were before the court alleging that appellant came within the provisions of Welfare and Institutions Code section 602. On November 8th, appellant admitted that the first petition was true with respect to four counts of burglary which involved two schools, a residence and a locked dairy truck. Five other counts of burglary and two counts of petty theft were dismissed in the interest of justice. Appellant’s detention, which commenced with his arrest on November 2, was ordered continued, pending a dispositional hearing set for November 21, 1978.

However, on November 13, 1978, a new section 602 petition was filed, alleging that appellant had committed an assault by means of force likely to produce great bodily injury (Pen. Code, § 245, subd. (a)) and had escaped from the juvenile hall (§ 871). Yet a third petition was filed the following day, alleging that appellant had committed a trespass (Pen. Code, § 602) and had unlawfully driven or taken a vehicle (Veh. Code, § 10851). On November 27th, appellant admitted the second petition alleging assault and escape. As a result, the third petition was dismissed.

A social study of appellant was prepared by the probation officer and submitted to the court for the dispositional hearing. (See §§ 280, 702.) The social study indicated that appellant was 15 years old. His only prior contacts with the juvenile court had been three incidents: two petty thefts when appellant was twelve and a possession of alcohol that occurred shortly before petitioner’s detention on the first petition. The juvenile court had never (1) imposed a wardship on appellant; (2) placed him on probation; or (3) attempted any out-of-home placement prior to its order committing him to the Youth Authority on the instant petitions.

Appellant’s statement in the social study indicated that he was involved with “undesirable characters” after he had returned from the Midwest to resume living with his mother. Appellant also admitted that he had assaulted a juvenile hall counselor as part of an escape plan. The probation officer indicated that appellant was apprehensive and concerned about the impending dispositional hearing.

The family background report stated that appellant’s parents had separated five years earlier, although at the time of the interview they were attempting a reconciliation. For the several previous years, appellant had travelled between Missouri and California, alternating between his grandparents’, his father’s and his mother’s residences. The parents believed that this situation had detrimentally affected the minor’s behavior. While in Missouri with his father for several months the previous winter, appellant had attended school regularly and had not engaged in any criminal activity. However, when he returned to his mother in the spring, he began failing in school. Appellant was held back, and attended only the first day of school in September 1978. Due to nonattendance, he was dropped from the school rolls in late October.

The social report recited that the probation officer had considered placement alternatives, but recommended a Youth Authority commitment. This recommendation was based on appellant’s “level of criminal sophistication” implied by the number of burglaries admitted by the minor. The felonious assault upon the juvenile hall employee was also cited as a ground for Youth Authority commitment.

At the dispositional hearing on December 13, 1978, appellant’s counsel opposed the Youth Authority commitment recommendation. He stressed the fact that no prior probation services or less restrictive placement for appellant had ever been attempted by the juvenile court. The district attorney argued that appellant’s violent escape from the more secure juvenile hall would make placement at the relatively open county youth center inappropriate.

At the conclusion of the hearing, the superior court ordered appellant committed to the Youth Authority. The court set a maximum confinement time of three years on the most severe charge, the assault with force likely to produce great bodily injury, and ordered all other counts to run concurrently. In response to appellant’s counsel’s request for credit for precommitment time spent in juvenile hall from appellant’s detention on November 2d, the court granted credit but only from December 11th.

II.

Appellant’s first contention is that his commitment to the Youth Authority was an abuse of discretion in that the superior court did not give adequate consideration to less restrictive placement alternatives. Specifically, the social study lacked data regarding specific alternative placements. The court failed to respond to counsel’s argument that the local youth center would be a more appropriate placement. Appellant asserts that the court had a duty to actively inquire as to the suitability of less restrictive placements, because statutory and decisional law placed limitations on the discretion of the juvenile court to commit minors to the Youth Authority.

Appellant is correct in his assertion that there are limitations to a superior court’s discretion to commit juvenile offenders to the Youth Authority. Section 734 states, for example, that “[n]o ward of the juvenile court shall be committed to the Youth Authority unless the judge of the court is fully satisfied that the mental and physical condition and qualifications of the ward are such as to render it probable that he will be benefited by the reformatory educational discipline or other treatment provided by the Youth Authority.” This court held as a corollary to the mandate of section 734 that “[t]he unavailability of suitable alternatives, standing alone, does not justify the commitment of a nondelinquent or marginally delinquent child to an institution [the Youth Authority] primarily designed for the incarceration and discipline of serious offenders.” (In re Aline D. (1975) 14 Cal.3d 557, 567 [121 Cal.Rptr. 816, 536 P.2d 65].)

This court in Aline D. observed that the statutory scheme guiding the superior court in its treatment of juvenile offenders “‘contemplates a progressively restrictive and punitive series of disposition orders in cases such as that now before us—namely, home placement under supervision, foster home placement, placement in a local treatment facility and, as a last resort, Youth Authority placement.’” (Id., at p. 564; see also In re Bryan (1976) 16 Cal.3d 782, 788 [129 Cal.Rptr. 293, 548 P.2d 693]; In re Arthur N. (1976) 16 Cal.3d 226, 237 [127 Cal.Rptr. 641, 545 P.2d 1345].) Nonetheless, there is no absolute rule that a Youth Authority commitment should never be ordered unless less restrictive placements have been attempted. (In re John H. (1978) 21 Cal.3d 18, 27 [145 Cal.Rptr. 357]; In re Willy L. (1976) 56 Cal.App. 3d 256, 265 [128 Cal.Rptr. 592].)

Appellant more specifically relies upon In re Michael R. (1977) 73 Cal.App.3d 327 [140 Cal.Rptr. 716], which held a Youth Authority commitment improper. There, the court held that “the juvenile court must consider each individual case on its merits without a mechanized approach based solely on the seriousness of the offense and must evaluate the appropriateness of the available lesser alternative dispositions in light of the purposes of the Juvenile Court Law. Before committing a minor to the C.Y.A., there should be some evidence in the record to support a finding that all these purposes cannot be accomplished by placement in a county facility.” (Id., at p. 340.) Appellant asserts that the lack of inquiry or comment by the judge at the dispositional hearing establishes that no consideration of less restrictive alternatives was made by the superior court.

This court cannot assume that the superior court judge, who presided over the dispositional hearing and heard appellant’s counsel’s arguments, gave them no consideration or completely failed to evaluate appellant’s suitability for the Youth Authority., Moreover, the silence of the judge regarding his reasons for making a Youth Authority commitment has never been held to violate statutory or constitutional requirements. (In re John H., supra, 21 Cal. 3d at pp. 22-27.) It is true that the lack of such a statement makes appellate review of the superior court’s exercise of discretion more difficult and uncertain (see In re John H„ supra, 21 Cal.3d at pp. 28-36, conc. opn. of Newman, J., conc. and dis. opn. of Bird, C. J.), but the absence of inquiry does not establish that the superior court failed to consider other placements.

Insofar as appellant attacks the exercise of the court’s discretion, there is evidence in the record to support a finding that the purposes of the Juvenile Court Law could not be accomplished by placement of appellant in a facility less restrictive than the Youth Authority. Appellant’s escape from the secure juvenile hall facility by means of force and violence supports a finding that a less restrictive placement would have been ineffective or inappropriate.

Appellant next raises several issues concerning his entitlement to credit for the time spent in juvenile hall prior to his commitment to the Youth Authority.

The entitlement to credit for all days of actual precommitment confinement against a maximum confinement time was established for juveniles in In re Eric J. (1979) 25 Cal.3d 522, 536 [159 Cal.Rptr. 317, 601 P.2d 549], The real issue is how much credit appellant should receive.

Respondent contends that appellant is not entitled to any credit on his maximum term of physical confinement, since the assault did not occur until the escape, some time, after appellant’s initial detention. This point has some merit.

Credit for adults for presentence incarceration is limited by Penal Code section 2900.5 to situations “where the custody to be credited is attributable to proceedings related to the same conduct for which the defendant has been convicted.” Appellant’s detention prior to the assault obviously was not attributable to proceedings related to the assault. Credit for that period is thus not available against appellant’s maximum term which was computed on the basis of the assault count in the second petition. Appellant is entitled to credit for all time spent in custody from his initial detention date (Nov. 2, 1978) against any portion of his maximum term attributable to the burglaries which were the subject of the first petition. However, the juvenile court elected not to aggregate the period of physical confinement based on the counts admitted in the first petition. Rather, it set the maximum term with reference only to the assault charge, with the shorter burglary terms to run concurrently. Therefore, appellant is entitled to credit against the maximum term only for days of confinement which followed his detention on the assault petition.

Appellant asserts he is also entitled to “conduct credits” as those are provided to adult prisoners pursuant to Penal Code section 4019 and this court’s decision in People v. Sage, supra, 26 Cal.3d 498. (See fn. 1, ante.) Appellant claims the right to such conduct credits on two bases: (1) as a matter of statutory entitlement under section 726 and (2) under the state and federal constitutional guarantees of equal protection of the laws. (Cal. Const., art. I, § 7; U.S. Const., 14th Amend.)

It should be noted initially that credits cannot be claimed by appellant on the basis that Penal Code sections 2900.5 and 4019 include juveniles within the class of persons entitled to such credits. While the applicability to juveniles of Penal Code section 2900.5’s credit for actual presentence time has been the subject of some uncertainty (see In re Eric J., supra, 25 Cal.3d at pp. 533-535; but see In re Michael W. (1980) 102 Cal.App.3d 946, 952-954 [162 Cal.Rptr. 744]), the statutory language of Penal Code section 4019 is clear. It refers only to prisoners in a county jail and does not by its terms apply to juveniles detained in juvenile hall.

However, appellant contends that the language in section 726, second paragraph, which refers to the juvenile court’s computation of the maximum period of physical confinement, implies that juveniles are entitled to conduct credit. The contention is that Eric J. required that credit be given for any time spent in detention to prevent juveniles from being confined longer than the maximum term imposed upon an adult. Appellant argues that this reasoning leads to the same result when applied to precommitment conduct credit.

A similar rationale has been expressed in two Court of Appeal cases, In re Maurice H. (1980) 107 Cal.App.3d 305 [165 Cal.Rptr. 887] and In re Eugene R. (1980) 107 Cal.App.3d 605 [166 Cal.Rptr. 219]. Those cases found that juveniles were entitled to conduct credits by “merging together the holdings of Sage and In re Eric J. ....” (In re Maurice H., supra, 107 Cal.App.3d at p. 314; see also In re Eugene R., supra, 107 Cal.App.3d at pp. 620-621.) The reasoning of these cases was set forth in In re Maurice H., supra, 107 Cal.App.3d at page 315, footnote 4: “The basis of the precommitment credit holding of In re Eric J., supra, was a construction of the portion of Welfare and Institutions Code section 726, subdivision (c), stating a juvenile ‘may not be held in physical confinement for a period in excess of the maximum term of imprisonment which could be imposed upon an adult convicted’ of the same offenses. An adult’s ‘maximum term’ would be calculated after application of the Penal Code section 2900.5 presentence credit. Thus, in order to keep the juvenile’s term within the same maximum, it is necessary to apply a similar credit to the juvenile’s term (id., at pp. 535-536). The same interpretive approach makes the Penal Code section 4019 type conduct credit available to persons such as Maurice by the juvenile court.”

Since appellant’s claim to conduct credits is based first on an interpretation of legislative intent, as expressed in section 726, reference must be made to the entire statute in order to ascertain that intent. (In re Bandmann (1958) 51 Cal.2d 388, 393 [333 P.2d 339]; Clements v. T. R. Bechtel Co. (1954) 43 Cal.2d 227, 232 [273 P.2d 5]; 2A Sutherland, Statutory Construction (4th ed. 1973) § 46.05, pp. 56-57.) The phrase “maximum term of imprisonment which could be imposed upon an adult” is specifically defined in the third paragraph of section 726, as “the longest of the three time periods set forth in paragraph (2) of subdivision (a) of Section 1170 of the Penal Code, but without the need to follow the provisions of subdivision (b) of Section 1170 of the Penal Code or to consider time for good behavior or participation pursuant to Sections 2930, 2931, and 2932 of the Penal Code, plus enhancements which must be proven if pled.” Penal Code sections 2930, 2931 and 2932 refer to the one-third reduction of term that can be earned for good behavior and participation by adult prisoners in state prison after they have entered a Department of Corrections facility. (See generally, People v. Sage, supra, 26 Cal.3d at pp. 504-506.) Thus, section 726, third paragraph expressly forecloses deduction of postcommitment behavior/participation credits from a juvenile’s maximum term of confinement. (See In re Eric J., supra, 25 Cal.3d at p. 536.)

Appellant contends that the failure to expressly exclude precommitment credits in the calculation of a juvenile term creates an inference that such credits should be granted. However, this argument ignores the very relevant fact that presentence conduct credits did not exist in 1977 for adult detainee/felons, the class of adult prisoners most analogous to juveniles detained prior to Youth Authority commitment.

In People v. Sage, this court determined that Penal Code section 4019 by its express terms did not apply to detainee/felons, but was limited to misdemeanants, contemners and felons who were serving local jail time as a condition of probation. (People v. Sage, supra, 26 Cal.3d at pp. 502-504.) Thus, the Legislature did not intend when it enacted Penal Code section 4019 in 1976 (Stats. 1976, ch. 286, § 4, pp. 595-596) that adults, who were confined pretrial and later sentenced to prison, should receive presentence conduct credit against their term of imprisonment. Not until this court’s Sage decision in 1980 was the right of detainee/felons to presentence conduct credits by virtue of the equal protection clause recognized.

The Legislature’s failure in 1977 to expressly exclude precommitment credits in the calculation of juvenile terms when the third paragraph to section 726 was added (Stats. 1977, ch. 1238, § 1, p. 4158) provides no comfort for appellant. A legislative intent to include precommitment conduct credits by failure to exclude them cannot be established if such credits simply did not exist at the time the statute was passed. The legislative intent to deny presentence conduct credits to the class of adults (detainee/felons) most analogous to appellant (a juvenile who is detained and then committed to the Youth Authority), considered in light of the express exclusion of postcommitment conduct credits in section 726, is strong evidence that the Legislature did not intend such credits to be deducted from the maximum term for juveniles.

Consideration of the equal protection analysis that led this court in Sage to grant presentence conduct credits to adult detainee/felons also reveals an anomaly that would be created by the grant of precommitment conduct credits to juveniles. In Sage, it was noted that once

delivered to the Department of Corrections, felons were entitled to one-third reductions of their terms of imprisonment by operation of Penal Code sections 2930, 2931, and 2932. In light of the existence of such credits once a felon reached state prison, denial of presentence conduct credits to detainee/felons created a disparity. Felons, who avoided presentence confinement, would be eligible for one-third off their entire sentence while felons, who were jailed prior to sentencing, would be ineligible for a one-third reduction for that portion of the sentence served prior to their arrival at state prison. (People v. Sage, supra, 26 Cal. 3d at p. 507.)

Detained juveniles, on the other hand, can complain of no such disparity. Section 726, third paragraph, precludes the application of postcommitment behavioral credits pursuant to Penal Code sections 2930, 2931 and 2932. Indeed, since no juveniles are eligible to earn such postcommitment credit, the granting of precommitment conduct credits would create a new disfavored class—juveniles who are committed to the Youth Authority but not detained prior to commitment. The nondetained juveniles would receive no conduct credit deductions, while detained juveniles would receive credits based upon the length of their precommitment detention. The “maximum term” would then vary in length among juveniles committed to the Youth Authority on identical petitions, depending.on the length of precommitment detention. Legislative intent to create such a disparity, which itself would raise equal protection issues, should not be inferred.

In addition to reliance upon statutory law, appellant also contends that equal protection principles require that he receive precommitment conduct credits. However, the holdings by this court in In re Eric J., supra, 25 Cal.3d 522, and People v. Austin (1981) ante, page 155 [178 Cal.Rptr. 312, 636 P.2d 1], prevent such a result.

This court recognized in Eric J. that maximum physical confinement computation for juveniles pursuant to section 726, creates a disparity between adults sentenced to prison and juveniles committed to the Youth Authority. A juvenile’s maximum term under section 726, third paragraph, is automatically set at the longest of three time periods established for the criminal offense, while an adult cannot be sentenced to the longest period absent a finding of aggravated circumstances. (Pen. Code, § 1170, subd. (b).)

Eric J.’s claim that this disparity denied him equal protection was rejected by this court. “The first prerequisite to a meritorious claim under the equal protection clause is a showing that the state has adopted a classification that affects two or more similarly situated groups in an unequal manner. [Citation and fn. omitted.] Adults convicted in the criminal courts and sentenced to prison and youths adjudged wards of the juvenile courts are not ‘similarly situated.’” (In re Eric J., supra, 25 Cal.3d at p. 530, italics in original.) This court found that juveniles committed to the Youth Authority are not similarly situated to adults sentenced to prison since there is a qualitative difference in the liberty interest of a minor, who is subject to both parental control and regulation by the state to an extent not permissible with adults. Also, the punitive purpose of adult imprisonment recently underscored by the enactment of the Determinate Sentencing Act (see Pen. Code, § 1170, subd. (a)(1)) was contrasted with the Juvenile Court Law’s declared objectives of treatment and rehabilitation. (In re Eric J., supra, 25 Cal.3d at pp. 530-533.)

Similarly, this court recently denied the equal protection claim of a youthful offender, who had been committed to the Youth Authority from adult court, to either precommitment or postcommitment conduct credits which are granted to offenders sentenced to state prison. (People v. Austin, supra, ante, p. 155.) Denial of such credits was held in Austin to be necessary to advance the state’s compelling interest in rehabilitation. This rationale applies equally to appellant, whose confinement is also for the purposes of treatment and rehabilitation.

Appellant’s equal protection claim must thus be rejected since this court in In re Eric J., supra, 25 Cal.3d 522, and People v. Austin, supra, ante, p. 155, has already decided the issue against him.

III.

There are several deficiencies in the superior court’s dispositional order, not raised by either party, which have become apparent to this court during its review of this case. First, the trial court’s denomination of a three-year median term instead of the four-year upper term on the assault offense was erroneous under section 726. Section 726 “is clearly directive and requires the juvenile court judge to automatically specify in his commitment order the maximum period of confinement corresponding to the applicable upper terms set forth in Penal Code, section 1170, subdivision (a)(2).” (In re James A. (1980) 101 Cal.App.3d 332, 339 [161 Cal.Rptr. 588]; accord, In re Eugene. R., supra, 107 Cal.App. 3d at p. 618.)

Authority exists for an appellate court to correct a sentence that is not authorized by law whenever the error comes to the attention of the court, even if the correction creates the possibility of a more severe punishment. (People v. Serrato (1973) 9 Cal.3d 753, 763-765 [109 Cal. Rptr. 65, 512 P.2d 289]; In re Sandel (1966) 64 Cal.2d 412 [50 Cal. Rptr. 462, 412 P.2d 806].) However, another aspect of the case makes remand with directions to the superior court, rather than appellate correction, more appropriate.

(5) The assault count (Pen. Code, § 245, subd. (a)) is, in the case of an adult, punishable alternatively as a felony or a misdemeanor with imprisonment in the county jail or state prison a possible punishment. (Pen. Code, § 17, subd. (b).) Section 702 requires that when a minor is found to have committed such an offense, “the court shall declare the offense to be a misdemeanor or felony.” The record in this case does not demonstrate that the court made an express finding that the assault offense was either a misdemeanor or a felony.

The record does indicate that the offense was described as a felony in the section 602 petition and that appellant admitted the truth of the charge. However, the preparation of a petition is in the hands of the prosecutor, not the court. The mere specification in the petition of an alternative felony/misdemeanor offense as a felony has been held insufficient to show that the court made the decision and finding required by section 702. (In re Jeffery M. (1980) 110 Cal.App.3d 983, 985 [168 Cal.Rptr. 337].) Similarly, the setting of a felony-level maximum period of confinement has been held inadequate to comply with the mandate of section 702. (In re Dennis C. (1980) 104 Cal.App.3d 16, 23 [163 Cal.Rptr. 496].) While the minutes of the dispositional hearing recited that the minor was committed to the Youth Authority “for conviction of felony, to wit: Vio. 245a PC,” the transcript of the dispositional hearing, as in Dennis C, “does not support this notation.” (Ibid.) Therefore, on remand the trial court should determine the character of the offense as required by section 702.

IV.

The order committing the appellant to the Youth Authority is affirmed. The case is remanded to the superior court for: (1) the award of credit for actual days in juvenile hall confinement attributable to the assault offense, consistent with the views expressed above; (2) a declaration by the court as to whether the assault offense is a misdemeanor or felony; and (3) the specification of the maximum period of physical confinement at either one year (if the assault is declared to be a misdemeanor) or four years (if the assault is declared to be a felony).

Tobriner, J., Mosk, J., Richardson, J., Newman, J., Lillie, J., and Fleming, J.,* concurred. 
      
      Penal Code section 4019 provides a deduction of one day from the period of confinement for every six days in county jail unless it appears the prisoner refused to satisfactorily perform labor (Pen. Code, § 4019, subd. (b)), and a similar reduction of one day for every six unless it appears that the prisoner has not satisfactorily complied with reasonable rules and regulations. (Id., subd. (c).)
      Under the literal language of Penal Code section 4019, the only prisoners eligible for conduct credits are those serving time in a county or city jail, industrial farm, or road camp on judgments of imprisonment, as a condition of probation, or under a definite term of confinement for contempt (Pen. Code, § 4019, subd. (a); People v. Sage, supra, 26 Cal.3d at pp. 503-504). Sage held that equal protection requires that prisoners who are detained in local facilities and later sentenced to prison must also receive conduct credits, even though they are not made eligible by statute. Application of conduct credits to detainee/felons later sentenced to prison was necessary to avoid disparity with felons who did not spend pretrial time in custody, since Penal Code section 2931 provided for conduct credits once a prisoner reached a Department of Corrections facility. (See discussion, post, at pp. 185-186.)
     
      
      Welfare and Institutions Code section 602 provides: “Any person who is under the age of 18 years when he violates any law of this state or of the United States or any ordinance of any city or county of this state defining crime other than an ordinance establishing a curfew based solely on age, is within the jurisdiction of the juvenile court, which may adjudge such person to be a ward of the court.”
      Unless otherwise stated, all statutory references are to the Welfare and Institutions Code.
     
      
      While the first petty theft incident had been dismissed after investigation, the second had led to a section 602 petition which was found true on October 28, 1975. No dispositional hearing was ever held, however, due to appellant’s failure to appear because of his mother’s mental illness. Appellant later moved to the home of his paternal grandparents in Missouri. The section 602 petition was ultimately dismissed in November 1977, on the recommendation of the probation officer, who cited the lack of severity of the charge, and the fact that appellant no longer resided in the county.
     
      
      Additionally, since a Youth Authority commitment requires removal of physical custody from the parent, there must be a finding to justify that removal under section 726.
     
      
      In In re Michael R., a first offender who had fired into an occupied dwelling (Pen. Code, § 246) was committed to the Youth Authority despite the recommendation of the juvenile probation officer that the minor be placed in a local camp facility. The Court of Appeal found that the Youth Authority commitment was impermissibly based solely on the seriousness of the offense, and that the dispositional hearing record was devoid of evidence to support the finding of probable benefit to the minor required by section 734.
     
      
      The general statutory purposes of the Juvenile Court Law are stated in section 202, which provides:
      “(a) The purpose of this chapter is to secure for each minor under the jurisdiction of the juvenile court such care and guidance, preferably in his own home, as will serve the ■spiritual, emotional, mental, and physical welfare of the minor and the best interests of the state; to protect the public from criminal conduct by- minors; to impose on the minor a sense of responsibility for his own acts; to preserve and strengthen the minor’s family ties whenever possible, removing him from the custody of his parents only when necessary for his welfare or for the safety and protection of the public; and, when the minor is removed from his own family, to secure for him custody, care, and discipline as nearly as possible equivalent to that which should have been given by his parents. This chapter shall be liberally construed to carry out these purposes.
      “(b) The purpose of this chapter also includes the protection of the public from the consequences of criminal activity, and to such purpose probation officers, peace officers, and juvenile courts shall take into account such protection of the public in their determinations under this chapter.”
     
      
      Thus, if the juvenile court had elected to impose an eight-month consecutive term for one of the burglary counts (§ 726, 4th par.; Pen. Code, § 1170.1, subd. (a)), appellant would be entitled to credit against that term for the actual number of days in confinement between his initial detention and the escape and assault. (Pen. Code, § 2900.5, subd. (b).)
     
      
      Respondent, citing In re Rojas (1979) 23 Cal.3d 152 [151 Cal.Rptr. 649, 588 P.2d 789], argues that all precommitment credit should be denied since appellant was already detained on the first petition when the assault took place. However, appellant’s escape and assault took place before a dispositional order was made on the burglary. He was thus not “serving a term” on the first petition, as was the case in Rojas. (Id., at p. 156; see also People v. Brown (1980) 107 Cal.App.3d 858, 863-865 [166 Cal.Rptr. 144].)
     
      
      Penal Code section 4019, subdivision (a), provides: “The provisions of this section shall apply in all of the following cases:
      “(1) When a prisoner is confined in or committed to a county jail, industrial farm, or road camp, or any city jail, industrial farm, or road camp, including all days of custody from the date of arrest to the date on which the serving of the sentence commences, under a judgment of imprisonment', or a fine and imprisonment until the fine is paid in a criminal action or proceeding.
      “(2) When a prisoner is confined in or committed to the county jail, industrial farm, or road camp or any city jail, industrial farm, or road camp as a condition of probation after suspension of imposition of a sentence or suspension of execution of sentence, in a criminal action or proceeding.
      “(3) When a prisoner is confined in or committed to the county jail, industrial farm, or road camp or any city jail, industrial farm, or road camp for a definite period of time for contempt pursuant to a proceeding, other than a criminal action or proceeding.”
     
      
      Section 726, second paragraph provides: “In any case in which the minor is removed from the physical custody of his parent or guardian as the result of an order of wardship made pursuant to section 602, the order shall specify that the minor may not be held in physical confinement for a period in excess of the maximum term of imprisonment which could be imposed upon an adult convicted of the offense or offenses which brought or continued the minor under the jurisdiction of the juvenile court.”
     
      
      Section 726 further defines the phrase “maximum term” in situations which do not involve a single felony offense punishable by three possible periods of imprisonment. If multiple offenses are involved, the juvenile court may aggregate the terms by using the formula for calculation of consecutive terms “in accordance with subdivision (a) of Section 1170.1 of the Penal Code.” (§ 726, 4th par.)
      Section 726 further provides that “[i]f the charged offense is a misdemeanor or a felony not included within the’ scope of Section 1170 of the Penal Code, the ‘maximum term of imprisonment’ is the longest term of imprisonment prescribed by law.” (§ 726, 5th par.)
     
      
      This writer dissented from the court’s decision in both In re Eric J., supra, 25 Cal.3d at pp. 538-539 (dis. opn. of Newman, J., joined by Bird, C. J.) and People v. Austin, supra, ante, at pp. 167-175 (dis. opn. of Bird, C. J.). However, these decisions are the law and must be followed. They do not support appellant’s equal protection claim to precommitment conduct credit. Rather, they are clear authority that a majority of this court finds no disparity of treatment between juvenile offenders and adult prisoners that would invoke the protections of the equal protection clause.
     
      
       Assigned by the Chairperson of the Judicial Council.
     