
52 Cal.App.3d 744 (1975)
125 Cal. Rptr. 291
In re RICARDO M., a Minor, on Habeas Corpus.
Docket No. 27304.
Court of Appeals of California, Second District, Division One.
November 4, 1975.
*746 COUNSEL
Morton Herbert for Petitioner.
John H. Larson, County Counsel, and William F. Stewart, Deputy County Counsel, for Respondent.
OPINION
THOMPSON, J.
The petition for habeas corpus here before us raises the issue of the right of the juvenile court to impose as a condition of probation, granted after an adjudication of wardship pursuant to Welfare and Institutions Code section 602, the requirement that the minor spend not less than 5 nor more than 20 days in juvenile hall as determined by the hall's staff. The issue is one in which decisions of the Court of Appeal in In re Preston B., 273 Cal. App.2d 607 [78 Cal. Rptr. 436], and In re Bacon, 240 Cal. App.2d 34 [49 Cal. Rptr. 322], on the one hand, and In re Debra A., 48 Cal. App.3d 327 [121 Cal. Rptr. 757], on the other, are in seeming conflict. We conclude that the juvenile court was empowered to impose the condition of probation.
*747 While already on probation under the juvenile court law, 14-year-old Ricardo M. was again, pursuant to Welfare and Institutions Code section 602, adjudicated a ward of the court on March 27, 1975. The offense charged was possession of marijuana. Ricardo was placed on probation and continued in the custody of his mother. On April 1, 1975, another petition was filed, pursuant to section 602, alleging that Ricardo had committed three burglaries. On April 25, still another petition charged Ricardo with possession of marijuana. On May 19, 1975, Ricardo admitted the commission of one of the burglaries.
Disposition hearing on the admitted burglary charge occurred on June 13, 1975. Probation reports involving Ricardo's prior contacts with the juvenile court revealed a history of trouble at school and with the law, as well as ties with "known gang members." On one occasion, Ricardo's mother had vainly urged his detention "with the hope that it [might] straighten [him] out." The current probation report recommended that Ricardo be declared a ward of the court pursuant to section 602 of the Welfare and Institutions Code, and that he be placed upon probation to remain in the home of his mother. Recommended conditions of probation were restitution, abstinence from contact with the victims of the burglaries and witnesses to the offenses charged, lack of association with narcotics users, abstinence from narcotics, and attendance at a school program approved by the probation officer.
At the disposition hearing, the juvenile court judge dismissed the charges of burglary not admitted, declared that Ricardo remain a ward of the court, and placed him on probation. The conditions of probation were those recommended plus an additional condition which is at issue on this appeal. The judge conditioned the probation upon Ricardo's spending not less than 5 nor more than 20 days in juvenile hall, the exact amount of time to be determined by the juvenile hall staff based upon Ricardo's attitude and cooperation. The order recites that it is its intent that Ricardo be detained for the minimum period if his attitude and cooperation are "adequate."
The juvenile court judge stated: "I am imposing [the added condition] under the provisions of 730 of the Welfare and Institutions Code, which indicates the Court may impose any reasonable term and condition of probation, and I feel that it is important that [Ricardo] have a short period of incarceration to deter [him] from further misconduct and criminal activities, and to aid in [his] rehabilitation. The Court considered a camp commitment ... but rejected it because of the fact there *748 seems to be some ties with the family, and [Ricardo is not] totally out of control and beyond the control of [his] parents, but [he has a] prior record, [has] been in trouble with the law before, and I think something has to be done to impress [him] with the seriousness of the offense, and I hope that [he doesn't] repeat again."
Execution of the added condition of probation was stayed while Ricardo pursued his application for writ of habeas corpus to this court. He filed his application and we issued an order to show cause. On August 12, 1975, a petition was filed pursuant to Welfare and Institutions Code section 602 alleging a curfew violation by Ricardo. On August 14, still an additional petition was filed charging Ricardo with burglary of an automobile. Proceedings on those charges have been continued pending disposition of the matter here before this court.
Ricardo contends that the additional condition of probation imposed by the juvenile court violates the policy of the Juvenile Court Law because it is punitive in character. He contends also that the condition is void because it is unsupported by a finding that the matter satisfies Welfare and Institutions Code section 726 stating the conditions for removing a minor from the custody of his parents.

Punitive Commitment
(1) The validity of the condition of probation imposing the short-term commitment of Ricardo to juvenile hall cannot be determined solely by reference to a categorization of the condition as punitive or rehabilitative. The distinction is too blurred to serve as a basis of determination. Rehabilitative conditions of probation concededly often include proscriptions upon conduct which are arguably punitive. Restitution to the victim (Welf. & Inst. Code, § 730) punishes the pocketbook of the probationer. Conditions on association punish by restricting social conduct that may be of great personal importance. The legal test of the validity of the condition is thus not its characterization but rather its conformity to the objectives and declared policies of the Juvenile Court Law. So tested, the condition is a valid one.
"[The] underlying philosophy [of the Juvenile Court Law] is that the state assumes a protective role with respect to the juveniles over whom it gains jurisdiction.... California decisions reflect the view that juvenile court proceedings are in the nature of guardianship proceedings ... and are concerned primarily with the welfare of the juvenile...." (Leroy T. *749 v. Workmen's Comp. Appeals Bd., 12 Cal.3d 434, 439 [115 Cal. Rptr. 761, 525 P.2d 665].) Juvenile court proceedings are "conducted for the protection and benefit of the youth in question." (In re Ricky H., 2 Cal.3d 513, 520 [86 Cal. Rptr. 76, 468 P.2d 204].) Juvenile court action thus differs from adult criminal prosecutions where "a major goal is corrective confinement of the defendant for the protection of society." (In re Ricky H., supra, at p. 519.) The protective goal of the juvenile proceeding is that "the child [shall] not become a criminal in later years, but a useful member of society." (People v. Renteria, 60 Cal. App.2d 463, 470 [141 P.2d 37].)
Here the condition of probation imposed by the juvenile court serves the protective goal of the Juvenile Court Law. It is imposed as an alternative to the more serious measure of commitment to a juvenile camp. Its purpose is to demonstrate to the minor the road to which continuation of delinquency will lead while at the same time preserving family ties which are the best of all possible means of bringing the child to productive adulthood. It seeks to avoid the unkind leniency which all too often leads the juvenile to further and more aggravated violations of law and consequently to a continuum of more severe treatment through camp and youth authority commitment to a sentence of state prison by a felony court.

Welfare and Institutions Code Section 726
(2) Ricardo contends that the condition of probation is illegal for lack of a specific finding by the juvenile court that a condition specified in Welfare and Institutions Code section 726 justifies the removal of his physical custody from his parents. The record indicates, however, that the juvenile court judge considered the factors stated in section 726 so that the necessary finding is present.
Our Supreme Court in determining a different issue in In re B.G., 11 Cal.3d 679 [114 Cal. Rptr. 444, 523 P.2d 244], supplies the guidelines which govern our decision here. It said (fn. 25 at p. 696): "In most juvenile court dispositional hearings custody awards are governed by Welfare and Institutions Code section 726, which states that `... no ward or dependent child shall be taken from the physical custody of a parent or guardian unless upon the hearing the court finds one of the following facts: [¶] (a) That the parent or guardian is incapable of providing or has failed or neglected to provide proper maintenance, training, and education for the minor. [¶] (b) That the minor has been tried on *750 probation in such custody and has failed to reform....' [¶] The language of section 726 should be interpreted in pari materia with the requirement of [Civil Code] section 4600 that in any proceeding in which custody is at issue, an award to a nonparent against a parent claim requires a finding of detriment [in continued parental custody]. Under this interpretation, subdivisions (a) and (b) of section 726 present specific instances of detriment justifying an award of custody to a nonparent; ..."
Here, on a record which established that probation in the custody of his parent had been ineffective in detouring Ricardo from his course of criminal conduct, the juvenile court judge noted that the prior record was the reason for imposing the condition of probation which is at issue on this appeal. That notation satisfies the substance of a finding that Ricardo failed on probation and that continued uninterrupted physical custody of Ricardo by his parent would be detrimental to him. Thus the conditions of subdivision (b) of Welfare and Institutions Code section 726 are found present and the subdivision permits the imposition of the condition.

Welfare and Institutions Code Section 730
(3) Existing case law requires examination of the condition of probation here imposed in light of Welfare and Institutions Code sections 730 and 731. Section 731 provides that, when a minor is adjudged a court ward pursuant to Welfare and Institutions Code section 602, the juvenile court may "order any of the types of treatment referred to in Sections 727 and 730 [of the Welfare and Institutions Code], and as an additional alternative, may commit the minor to the Youth Authority."
Section 727 deals with placing custody and control of the minor with a person, a "home," or other agency. Section 730 is framed in two unnumbered paragraphs. The first declares: "When a minor is adjudged a ward of the court ... [in addition to the alternatives specified in section 727] ... [it] may commit the minor to a juvenile home, ranch, camp, or forestry camp. If there is no county juvenile home, ranch, camp, or forestry camp within the county, the court may commit the minor to the county juvenile hall." The second paragraph of section 730 states in pertinent part: "When such ward is placed under the supervision of the probation officer or committed to his care, custody and control ... [t]he court may impose and require any and all reasonable conditions that it may determine fitting and proper to the end that justice may be done and the reformation and rehabilitation of the ward enhanced."
*751 Without discussing Welfare and Institutions Code sections 730 and 731, two Court of Appeal decisions approve conditions of probation similar to that involved in the case at bench. In re Bacon, supra, 240 Cal. App.2d 34 [49 Cal. Rptr. 322], involves a requirement of probation that the minor probationer spend four weekends at the probation department's training academy subject to reduction to two weekends in the discretion of the probation officer. In re Preston B., supra, 273 Cal. App.2d 607 [78 Cal. Rptr. 436], involves a commitment to juvenile hall for 12 weekends as a condition of probation.
In re Debra A., supra, 48 Cal. App.3d 327 [121 Cal. Rptr. 757], invalidates a successive weekend commitment to juvenile hall on the ground that it fails to comply with the first paragraph of section 730, there being an available juvenile home within the county. Debra A. does not discuss Bacon, Preston B., or the second paragraph of section 730. Analysis of the decision in Debra A. explains the omission. There is no indication in that opinion that the weekend commitment was imposed as a condition of probation. To the contrary, the opinion states that conditions of probation were discussed and that one of the attorneys stated: "I don't think any placement would help her at this time. She's got to realize that when she's 18 years of age [in two weeks from the date of ... hearing] and she gets in trouble, she faces jail time, she's not facing home on probation." The opinion in Debra A. then states the order of commitment to weekends in juvenile hall in terms other than as a condition of probation. (48 Cal. App.3d at p. 329.)
We thus reconcile Debra A., with Bacon, Preston B., and the second paragraph of Welfare and Institutions Code section 730 by the apparent proposition that Debra A. does not deal with a weekend commitment as a condition of probation. So considered, the commitment in Debra A. is controlled by the first and not the second paragraph of section 730, and Bacon and Preston B. are inapposite to the conclusion reached in Debra A.
In the case at bench, we deal with a short term commitment to juvenile hall which is a condition of probation. As such, it is validated by Bacon and Preston B. On the facts, the condition is reasonable, fitting, and proper to the end that the reformation and rehabilitation of Ricardo will be enhanced, thus meeting the test of the second paragraph of section 730.


*752 Indefinite Duration

(4) The period of commitment here involved is not less than 5 nor more than 20 days, leaving its exact duration to the discretion of the juvenile hall staff. Since the juvenile hall is under the management and control of the probation officer (Welf. & Inst. Code, § 852), the discretion is in effect vested in him. Similar discretion was approved, tacitly if not expressly, in In re Bacon, supra, 240 Cal. App.2d 34. Bacon persuades that the discretion should be approved here.

Disposition
The petition for writ of habeas corpus is denied.
Wood, P.J., and Hanson, J., concurred.
