
214 Cal.App.3d 1610 (1989)
264 Cal. Rptr. 476
In re MICHAEL D., a Person Coming Under the Juvenile Court Law.
THE PEOPLE, Plaintiff and Respondent,
v.
MICHAEL D., Defendant and Appellant.
Docket No. G007908.
Court of Appeals of California, Fourth District, Division Three.
October 6, 1989.
*1612 COUNSEL
Ronald Y. Butler, Public Defender, Carl C. Holmes, Thomas Havlena and Carol E. Lavacot, Deputy Public Defenders, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Richard B. Iglehart, Chief Assistant Attorney General, Harley D. Mayfield, Assistant Attorney General, Robert M. Foster and Janelle B. Davis, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
SCOVILLE, P.J.
In a petition dated December 12, 1988, it was alleged minor came under the provisions of Welfare and Institutions Code section 602 because he escaped while in the custody of the Orange County probation officer on "home confinement." (Welf. & Inst. Code, § 871.) The petition was sustained after a court trial. Thereafter, on January 19, 1989, a subsequent petition was filed charging minor with two counts of felony assault by means of force likely to produce great bodily injury (Pen. Code, § 245, subd. (a)(1)).
In a negotiated plea and disposition the trial court amended the January 19, 1989, petition to add misdemeanor assault and battery charges (Pen. Code, §§ 240, 242), and dismissed the felony assault charges. Minor admitted the misdemeanor assault and battery charges. He waived his right to be sentenced before the commissioner who presided at the trial on the escape charge, and a disposition agreement was filed. Pursuant to that agreement, minor was continued as a ward of the juvenile court on condition he serve 180 days in custody, with credit for 51 days already served, and he was ordered to abide by certain specified conditions of probation.
*1613 On this appeal the minor challenges the validity of his escape conviction and certain conditions of his probation. Accordingly, we confine our factual discussion to the escape charge.

FACTS
On November 10, 1988, minor, who was 15 years old, was committed to the Youth Guidance Center, a county custodial facility, for 30 days after a petition charging him with violations of Vehicle Code section 10851 and Penal Code section 496 was sustained. On November 28, 1988, he was released to his parents' home under the home confinement program to serve out the remainder of his 30-day term. Home confinement time is custody time. William Vanderwal, minor's home confinement officer, indoctrinated minor to the rules of the home confinement program explaining to him, among other things, that he was not to leave his house for any reason without the prior approval of his home confinement officer.[1]
On December 7, 1988, minor's mother and father left the house at 7:30 p.m. to go to a meeting. When they left, minor was in the front room with his older brother. When they returned at 10:30 p.m., minor was not in the house, although his older brother was asleep in his room. When minor's mother woke up the next day, minor was still not in the house. Minor's mother looked through the house for minor but did not look in the garage. The garage was used for storage. It contained a dryer, a broken television set, a refrigerator, a couch and various boxes and tools. Minor's mother testified minor slept on the couch in the garage overnight maybe twice in the summer. There were no bathroom facilities in the garage.
Some time after 9:30 a.m. she called Vanderwal and told him minor was not at home. Vanderwal came to minor's house about 11:30 a.m. and talked with minor's mother, but did not search the house for minor.
Minor's mother next saw minor at 2:30 p.m. when minor "came in through the kitchen." The kitchen faces into the backyard. Minor looked like he had slept in his clothes, and his hair was uncombed.
Minor testified in his own defense that he spent the night sleeping in the garage. He went into the garage about 8:30 p.m. or 9 p.m. on December 7. *1614 He was doing some drawing in the garage and fell asleep on the couch about 10 p.m. He did not wake up until about 2 or 2:30 p.m. the next day. He did not know anyone was looking for him until his mother asked him where he had been. He told her he had been in the garage.
The trial court did not believe minor's testimony that he spent the night sleeping in the garage.[2]

DISCUSSION

I
(1a) Minor contends he was not guilty of an escape as defined in Welfare and Institutions Code section 871. That section provides in subsection (a): "Any person under the custody of a probation officer or any peace officer in a county juvenile hall, or committed to a county juvenile home, ranch, camp, or forestry camp, or any person being transported to or from a county juvenile hall, home, ranch, camp or forestry camp, who escapes or attempts to escape from that place or during transportation to or from that place, is guilty of a misdemeanor, punishable by imprisonment in the county jail not exceeding one year."
Asserting escape statutes must be strictly construed, minor contends he had been released early and was living in his own home under the care of his parents, not in a county juvenile hall. He claims being away from his own home does not constitute an escape within the meaning of Welfare and Institutions Code section 871. We agree and hold that while minor was at home under the home confinement program he was not "under the custody of a probation officer in a county juvenile hall."
(2) Penal statutes should be strictly construed. (People v. Overstreet (1986) 42 Cal.3d 891, 896 [231 Cal. Rptr. 213, 726 P.2d 1288].) (3) The crime of escape is completely statutory; hence, when escape is charged we must look to the terms of the applicable statute to ascertain the nature of the crime. (People v. Martinez (1987) 188 Cal. App.3d 1254, 1260 [233 *1615 Cal. Rptr. 877].) (1b) Welfare and Institutions Code section 871 proscribes escape from a county juvenile hall, county juvenile home, ranch, camp or forestry camp. By its plain wording it does not contemplate an escape from one's own home after an early release on the home confinement program, nor does it purport to punish such conduct. Under Welfare and Institutions Code section 871 a person must be not only under the custody of a probation officer or a peace officer, he or she must also be "in a county juvenile hall, or committed to a county juvenile home, ranch, camp or forestry camp," and must escape or attempt to escape "from that place." Here minor had been released to his own home, not a county institution, nor any substitute for a county institution.
Respondent relies on the concept of constructive custody as enunciated in In re Ernest M. (1977) 71 Cal. App.3d 890 [139 Cal. Rptr. 773]. In that case the minor was committed to the custody of the probation officer for suitable placement at CEDU Foundation. While awaiting an opening at CEDU, the probation officer temporarily placed the minor at Rancho San Antonio, a residential treatment facility operated by the Brothers of the Holy Cross of the Roman Catholic Church. The court held the minor's escape from the religious facility was an escape under Welfare and Institutions Code section 871 because the minor "was constructively `under the custody of a probation officer in a county juvenile hall' ...." (Id. at p. 894.) The court in In re Ernest M. noted, "The trial court took judicial notice that Rancho San Antonio was widely used by the court as a `suitable placement' facility and concluded that the Rancho obviously met the standards of the probation department and therefore could be said to have been `established in conjunction with the probation department' as provided in Welfare and Institutions Code section 882." (Id. at p. 893, fns. omitted.) Rancho San Antonio was, in effect, an authorized substitute for the usual county juvenile institutions. The same cannot be said for minor's home. Under the circumstances, we find In re Ernest M. to be factually distinguishable. Minor was not constructively in the custody of the probation officer in a county juvenile facility when he was in his parents' home.
It is true minor was under orders not to leave his home for any reason without the prior permission of his home confinement officer. Violation of that rule, however, is punishable by the means available for punishing any violation of probation. It does not constitute the basis of a new crime.
Under the circumstances the judgment must be reversed as to the escape charge, and the matter remanded to the trial court for a redisposition hearing.


*1616 II
For the guidance of the trial court on redisposition, we address minor's contentions regarding the conditions of probation. Minor contends seven of the conditions of his probation are "unconstitutional, vague and overboard." The conditions complained of are: 1. "You are not to spend the night away from home without DPO permission." 2. "You are not to be out of your home between 8 p.m. and 5 a.m. without prior approval of your probation officer." 3. "You are not to be with anyone who is using or possessing any illegal intoxicants, narcotics or drugs." 4. "You are not to be present in any known gang gathering area...." 5. "You are not to have, nor associate with anyone who has,... weapons...." 6. "You are to submit to search and seizure of your person, property ... residence ... at any time...." 7. Do not wear ... any article of clothing which is evidence of ... membership in the Middleside street gang."
(4a) The juvenile court has broad discretion when formulating conditions of probation. (In re Frankie J. (1988) 198 Cal. App.3d 1149, 1153 [244 Cal. Rptr. 254]; In re Todd L. (1980) 113 Cal. App.3d 14, 19 [169 Cal. Rptr. 625.) (5) However, a condition of probation may be invalid if it has no relationship to the crime an offender has been convicted of, relates to condition which is not in itself criminal or requires or forbids conduct which is not reasonably related to future criminality. (People v. Lent (1975) 15 Cal.3d 481, 486 [124 Cal. Rptr. 905, 541 P.2d 545].) (4b) Still a condition of probation impermissible for an adult may not necessarily be unreasonable for a juvenile in light of the unique rehabilitative function of the juvenile court. (In re Frankie J., supra, 198 Cal. App.3d at p. 1153; In re Todd L., supra, 113 Cal. App.3d at p. 19.) In planning conditions of probation the juvenile court must consider the minor's entire social history in addition to the circumstances of the offense. (In re Todd L., supra, at p. 20.) Even conditions which infringe on constitutional rights may not be invalid if tailored specifically to meet the needs of the juvenile (In re White (1979) 97 Cal. App.3d 141, 149-151 [158 Cal. Rptr. 562].)
(6) Here, minor was a self-confessed member of Middleside gang in Santa Ana. The probation officer stated minor told him, he had been "jumped into the Middleside gang at the age of 10 and has been a member for the last five years."[3] He stated he considers "the gang to be his family and the members his brothers.... [H]e has no intention of disassociating himself from the gang and will continue to claim Middleside upon his release." Minor said he had been involved in fights as a result of his gang *1617 affiliation and "is willing to back up his home boys." He stated although his mother disapproved of his gang membership "it was something she has to deal with."
In light of minor's parents' inability to control his gang affiliation although he was only 15 years of age, the probation conditions designed to curb those dangerous associations were not unreasonable. Minor's conviction for misdemeanor assault and battery was a result of gang activity and the offense occurred during the time he was supposedly under the home confinement program. Minor contends he lives in the Middleside gang area and a condition he stay out of known gang gathering areas is vague and restricts his constitutional right to travel. But we think the condition is not "so sweeping and so punitive that it becomes unrelated to rehabilitation." (In re White, supra, 97 Cal. App.3d at p. 148.) Given the facts of this case requiring minor to stay out of known "gang gathering areas" is neither unreasonably vague nor unconstitutional.
Minor admitted to the probation officer that he had experimented with drugs and used alcohol, hence the condition that he eschew the company of persons using or in possession of those substances was proper.
Minor challenges the search and seizure condition and the condition he not associate with anyone who has weapons. Both were reasonable under the circumstances of this case. The charge against minor in the original supplemental petition was assault with a deadly weapon. The probation officer noted in his report, "the minor has a collateral offense for assault with a deadly weapon. If this petition is sustained,[4] it could very well be an indicator of the minor's increased involvement and commitment to this particular gang. Assaultive behavior is not uncommon for gang members.... In fact, it is an expectation of membership to most gangs." In fact, the deputy district attorney stated at the disposition hearing the assault charge in this case, "specifically involved a confrontation between Middleside and Santa Anita gang members." In imposing the challenged terms and conditions of probation the court specifically stated it did so because of minor's gang affiliation. As was stated by this court in In re Frankie J., supra, 198 Cal. App.3d 1149, 1154, footnote 4, "There is an additional factor which would also justify the weapons restriction. Gang activities and weapon possession go hand-in-hand."
The conditions of probation imposed in this case were proper under the circumstances. (In re Todd L., supra, 113 Cal. App.3d 14, 18-20.)
*1618 The judgment as to the escape charge is reversed, and the matter is remanded for redisposition. In all other respects the judgment is affirmed.
Crosby, J., and Staniforth, J.,[*] concurred.
NOTES
[1]  Vanderwal described the program as follows: "It's a program that the probation officer offers to minors who are sentenced to something like 60 days or less. When they get down to where they have 30 days remaining on their commitment, they're assessed. And if they are deemed eligible and would appear to profit from being released ... early.... [¶] But the idea of it is to allow a gradual resocialization into society under more intensive supervision than a minor who is released on normal probation would be allowed."
[2]  In making its ruling the court stated, "The difficulty the court has is in believing that [minor] would have slept from 9:00 the previous evening until approximately 2:00 the following afternoon, not coming in even to use the restroom facilities. That seems to be unusual in terms of [minor's] previous habits, as testified to by mother, getting up at 7:00 during school days and at 10:00, 10:30 on Saturdays, significantly past that for a person to sleep until 2:00 in the afternoon, 1:30 in the afternoon. [¶] The court does not credit [minor's] statement that he spent the evening in the garage. The court feels, factually, that he was away from the residence on the evening in question based on mother's testimony that she did not see him there, and then the court's disbelief of [minor's] explanation that he had spent the night in the garage."
[3]  Minor explained a "jump in" initiation into gang membership means he had "to fight against members of the gang to prove himself."
[4]  In fact, minor admitted a lesser charge  misdemeanor assault and battery.
[*]   Retired Associate Justice of the Court of Appeal sitting under assignment by the Chairperson of the Judicial Council.
