
102 Cal.App.3d 946 (1980)
162 Cal. Rptr. 744
In re MICHAEL W., a Minor, on Habeas Corpus.
Docket No. 36598.
Court of Appeals of California, Second District, Division Three.
February 28, 1980.
*947 COUNSEL
Wilbur F. Littlefield, Public Defender, Kenneth I. Clayman, Judy Rochlin and Henry J. Hall, Deputy Public Defenders, for Petitioner.
*948 George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Edward T. Fogel, Jr., and Gary R. Hahn, Deputy Attorneys General, for Respondent.
OPINION
COBEY, Acting P.J.
This is a habeas corpus matter in which petitioner, Michael W., a minor, seeks to receive credit for time spent in predisposition custody against time he is to serve at juvenile hall as a condition of probation.
On November 30, 1979, we issued an order in this proceeding to the Superior Court of Los Angeles County to vacate its order of November 20, 1979, detaining petitioner at juvenile hall for 20 to 30 days as a condition of his probation, insofar as it failed to credit petitioner with time spent in predisposition custody pursuant to Penal Code section 2900.5, or to show cause to this court on February 20, 1980, why we should not issue a writ of habeas corpus directing it to do so. Enforcement of the trial court's order was stayed pending a further order of this court. The superior court has not vacated its order.
We have considered the petitioner's petition for a writ of habeas corpus and the points and authorities in support thereof. We have also considered the Attorney General's return to the order to show cause, the points and authorities in support thereof, and the petitioner's reply thereto.
We are persuaded by the argument of the Attorney General that In re Eric J. (1979) 25 Cal.3d 522 [159 Cal. Rptr. 317, 601 P.2d 549], modified 26 Cal.3d 456a, requires only that credit for predisposition custody be given where the minor has been committed potentially for the maximum sentence which could be imposed on an adult convicted of the same offense. We, therefore, intend to deny the writ in this instance.

FACTS
On May 1, 1979, a petition was filed in Los Angeles County Juvenile Court alleging that petitioner came within the provisions of Welfare and *949 Institutions Code section 602, for conduct which violated Penal Code section 484, subdivision (a) (theft) and Penal Code section 242 (battery). Both of these alleged offenses were misdemeanors. Petitioner failed to appear at the adjudication hearing on this matter. A warrant for his arrest was issued. Petitioner was arrested and subsequently detained in juvenile hall pending adjudication and disposition.
The petition was sustained as to both allegations. Petitioner was placed home on probation, one condition of which was that he serve 20 to 30 days in juvenile hall.[1] At the time of disposition, petitioner had spent 30 days in predisposition custody. He requested that, pursuant to Penal Code section 2900.5, this time be credited against the 20- to 30-day period of confinement imposed as a condition of probation. This wipe-out credit was denied.

DISCUSSION
(1a) Our Supreme Court in In re Eric J., supra, 25 Cal.3d 522, reviewed the applicability to juvenile detentions of Penal Code section 2900.5, in light of the 1978 amendment to it which provides that credit also be given for time spent in a juvenile detention facility.
The court stated: "Relying on section 2900.5 of the Penal Code and section 726 of the Welfare and Institutions Code, appellant contends he is entitled to 46 days credit for time in custody in a juvenile detention facility prior to commitment to the Youth Authority....
"We first consider whether appellant is entitled to precommitment credit under Penal Code section 2900.5.
"In People v. Sandoval (1977) 70 Cal. App.3d 73 [138 Cal. Rptr. 609], the defendant, under the age of 21 at the time of the offense, pleaded guilty to robbery and was placed on probation on condition he serve one year in county jail. After release on probation, the defendant was arrested on another robbery charge and, being found in violation of probation, was `sentenced' to the Youth Authority. The Court of Appeal held that section 2900.5 entitled the defendant to credit for the *950 year served in county jail as a condition of probation and for 90 days spent in custody awaiting revocation proceedings. Section 2900.5 then provided in relevant part: `(a) In all felony and misdemeanor convictions, either by plea or by verdict, when the defendant has been in custody, including but not limited to any time spent in a jail, camp, work furlough facility, halfway house, rehabilitation facility, hospital, prison, or similar institution, all days of custody of the defendant, including days served as a condition of probation in compliance with a court order, shall be credited upon his sentence, ...' (Italics added.) Explaining its conclusion that the statute applied to `sentences of felons committed to the CYA,' the Court of Appeal noted: `By its express terms, the statute applies to all felony and misdemeanor convictions and provides for credit for the time a defendant has spent in custody as a condition of probation and awaiting proceedings "related to the same conduct."' (70 Cal. App.3d at p. 88.) Alternatively, the Court of Appeal held that `a statutory construction excluding youthful felons committed to the CYA from the benefits of section 2900.5 would constitute a denial of equal protection under the rationale of Olivas, [(1976) 17 Cal.3d 236 (131 Cal. Rptr. 55, 551 P.2d 375)] (Id. at p. 89.)
"In In re Leonard R. (1977) 76 Cal. App.3d 100 [142 Cal. Rptr. 632], the appellant relied on Sandoval and Olivas in seeking credit against a Youth Authority commitment for time spent in juvenile hall pending the juvenile court proceedings culminating in that commitment. Distinguishing Sandoval and Olivas on the ground they `involved proceedings in adult courts,' the Court of Appeal held that the appellant was not entitled to the credit under section 2900.5, and that excluding him from the benefits of that section did not deny him equal protection of the law. `Penal Code section 2900.5 by its very terms is not applicable to juvenile commitments. The statute refers to "felony and misdemeanor convictions" and provides for precommitment custody time to be credited only against the defendant's "sentence." (Italics added.) A declaration of wardship is not a "conviction" and a dispositional order of the juvenile court is not a "sentence." (76 Cal. App.3d at pp. 103-104.) Regarding the equal protection issue, the court held: `The distinction between juveniles and adults which permits different legislative treatment in terms of confinement and disposition is to be found in the fundamental and conceptual difference between criminal prosecution and juvenile proceedings. Such a distinction is not arbitrary and clearly bears a substantial relation to a legitimate legislative objective.' (76 Cal. App.3d at pp. 104-105.)
*951 "The Court of Appeal in the present case did not hold that appellant was entitled to credit under the terms of section 2900.5, but rather, relying on Olivas, held it would be a denial of equal protection of the law to deny him credit. In In re Maurice S. (1979) 90 Cal. App.3d 190 [153 Cal. Rptr. 317], mod. 91 Cal. App.3d 123b, the Court of Appeal reached the same conclusion on the equal protection issue.
"Appellant does not so contend, but the petitioner in In re Garcia (2 Crim. 34007. petn. for habeas corpus den. 8 Jan. 1979, hg. den. by Supreme Ct. 11 Jan. 1979) argued that the Legislature responded to Leonard R. by amending section 2900.5 to extend its benefits to juveniles. In 1978, the section was amended by including time spent in a `juvenile detention facility' as time that must be credited. In support of his interpretation of the significance of the amendment, the petitioner in Garcia attached as an exhibit to the petition for habeas corpus in the Court of Appeal a letter from the author of both the original statute and the amendment, State Senator Alan Sieroty. Senator Sieroty stated in pertinent part: `The phrase "juvenile dentention facility" has been added to the list of places of confinement in Penal Code Section 2900.5 to relieve the ambiguity that was the basis of [Leonard R.].... Our amendment ... is designed to reverse this court interpretation and to insure that a minor may not be placed in jeopardy of serving more time than his adult counterpart.'
"However, as Senator Sieroty concedes: `It is possible that the amendment to Section 2900.5 could be construed to not affect the In re Leonard R. holding because a dispositional order of the juvenile court is not a "sentence." I regret that this ambiguity in our statute still exists.' The reference is to the statement in Leonard R. explaining the court's conclusion that section 2900.5 does not apply to juveniles: `A declaration of wardship is not a "conviction" and a dispositional order of the juvenile court is not a "sentence."' (76 Cal. App.3d at p. 104.) As neither of the terms found crucial by the court in Leonard R. was changed, it is not clear that the 1978 amendment to section 2900.5 was intended as repudiation of that decision. The point of the amendment may have simply been to insure that a minor who is ultimately tried as an adult is given credit for all time in custody prior to sentence, whether that time was spent in a jail or in a juvenile detention facility.
"In In re Harm R. (1979) 88 Cal. App.3d 438 [152 Cal. Rptr. 167], the Court of Appeal felt it unnecessary to `become embroiled in any *952 controversy between Leonard R. and Eric J. vis-a-vis the application of Penal Code section 2900.5 to the juvenile court.' Instead, the court analyzed the question of a juvenile's entitlement to precommitment credit as calling for interpretation of Welfare and Institutions Code section 726.[2] `Section 726 provides that when a minor is removed from the custody of his parents as the result of an order of wardship made pursuant to section 602 (the instant case), a minor may not be held in a physical confinement for longer than the underlying crime and physical confinement expressly includes juvenile hall. Thus, the 145 days in juvenile hall must be credited against the total time the minor may be held within the jurisdiction of the juvenile court.' (88 Cal. App.3d at p. 445.)
"In support of Harm R.'s interpretation of section 726, subdivision (c), it may be noted the statute expressly states the minor's maximum term is not to be reduced by `time for good behavior or participation pursuant to Sections 2930, 2931, and 2932 of the Penal Code,' suggesting that precommitment credit would also have been expressly excluded, had that been the Legislature's intent.
"Although the question of legislative intent is not free from doubt, we conclude that, in order to carry out the mandate of section 726, subdivision (c), that a juvenile `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, appellant must be given precommitment credit for the 46 days he was detained in juvenile hall pending resolution of these charges." (In re Eric J., supra, 25 Cal.3d at pp. 533-536.) (Italics in original.)
The court in Eric J. was not presented with the situation presented here of commitment ordered as a condition of probation and did not address *953 the issue. Respondent suggests that Penal Code section 2900.5 credit is granted to juveniles only in those situations in which the juvenile has been committed potentially for the maximum term.
We agree. We note that Welfare and Institutions Code section 726, apparently contemplates in the usual situation the imposition of a ceiling upon the period of confinement equal to the maximum period which can be imposed on an adult convicted of the same offense.[3] (see In re Eric J., supra, 25 Cal.3d at pp. 528-533; In re James A. (1980) 101 Cal. App.3d 332 [161 Cal. Rptr. 588]), and that Eric J.'s predisposition credit was apparently based upon that section rather than upon Penal Code section 2900.5.
(2), (See fn. 4.) (1b) A period of confinement in juvenile hall ordered as a condition of probation, as here, is authorized under Welfare and Institutions Code sections 727, subdivision (1), and 730 (see In re Ricardo M., supra, 52 Cal. App.3d at pp. 750-751)[4] and the time so imposed in this case does not approach the possible maximum sentence.[5]
In this situation petitioner would be entitled to credit for predisposition custody only if Penal Code section 2900.5, as amended, can be read to apply to all juveniles committed through the juvenile court system.[6] As our Supreme Court and Senator Sieroty noted, irrespective of the possible contrary intent of the legislators, it cannot. The statutory language *954 analyzed by the court in Leonard R. has not been changed.[7] Our Supreme Court in Eric J. did not disagree with the Leonard R. decision with respect to the analysis of Penal Code, section 2900.5, but merely with respect to the interpretation of the Welfare and Institutions Code. Accordingly, Penal Code section 2900.5, by itself, is not applicable to juveniles committed through the juvenile court system. Therefore, petitioner is not entitled to the credit requested.

DISPOSITION
The petition for writ of habeas corpus is denied. The stay issued by this court on November 30, 1979, is vacated.
Allport, J., and Potter, J., concurred.
A petition for a rehearing was denied March 27, 1980, and petitioner's application for a hearing by the Supreme Court was denied April 24, 1980.
NOTES
[1]  This has become known as Ricardo M. time. (See In re Ricardo M. (1975) 52 Cal. App.3d 744 [125 Cal. Rptr. 291].)
[2]  "As previously stated, section 726, subdivision (c) of the Welfare and Institutions Code provides in relevant part: `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. [¶] As used in this section and in Section 731, "maximum term of imprisonment" means 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.'"
[3]  The section does, however, provide expressly that nothing in it shall be construed to limit the power of the court to make appropriate orders pursuant to section 727.
[4]  Ricardo M. custody, however, is subject to the restrictions imposed on the removal of minors from parental custody by Welfare and Institutions Code section 726. A finding of one of the conditions expressed in section 726 must be expressly or impliedly stated in the record. (See In re John S. (1978) 83 Cal. App.3d 285, 290-291 [147 Cal. Rptr. 771].) Petitioner does not suggest that such finding is lacking in this case. We note the necessity of such finding.
[5]  The maximum sentence for both petty theft and misdemeanor battery, the two offenses charged against petitioner, is six months, plus a $1,000 fine. (Pen. Code, §§ 243, 490.) Petitioner is to spend 20 to 30 days in juvenile hall. His time spent in predisposition custody was 30 days. Thus, he could spend only a possible two months total time. We note, however, that should petitioner in the future be subject to additional commitment on these charges, potentially reaching the maximum sentence, he will be entitled to credit for all time spent in custody, including the 30 days predisposition time. (See In re Eric J., supra, 25 Cal.3d at p. 536.)
[6]  Penal Code section 2900.5 mandates that time spent in presentence custody be credited upon "any ... period of imprisonment imposed as a condition of probation." (Pen. Code, § 2900.5, subd. (c).)
[7]  We note that the 1978 amendment did substitute the words "term of imprisonment" for "sentence" in part of the section. The statute, however, retains the term "sentence" in part, e.g. it refers to the "court imposing the sentence." (See Stats. 1978, ch. 304, § 1.)
