Opinion
McDONALD, J.The People alleged in an amended petition that A.G., a minor, came within the juvenile court jurisdiction under Welfare and Institutions Code1 section 602 because she violated Vehicle Code sections 23136, subdivision (a), and 22349, subdivision (a), and the curfew provisions codified in San Diego Municipal Code section 58.0102. The court found true the allegations of the Vehicle Code section 22349, subdivision (a) violation, and the San Diego Municipal Code section 58.0102 violation, and found A.G. was a person described in sections 601 and 602. At the dispositional hearing, the court placed A.G. on six months’ probation.
A.G. challenges the true finding that she violated either San Diego’s curfew ordinance (San Diego Ord. No. 0-18416; hereafter the curfew ordinance) or San Diego Municipal Code section 58.0102, the codification of the curfew ordinance. She asserts both the curfew ordinance and San Diego Municipal Code section 58.0102 contain an implied prerequisite requirement for a true finding that she must have previously received a curfew violation warning citation, and there was no evidence she had previously received a warning citation. She also raises a due process claim arising out of the discrepancy, discussed at parts IC. and II, between the curfew ordinance and its codification in San Diego Municipal Code section 58.0102. She also asserts the curfew ordinance and San Diego Municipal Code section 58.0102 violate the equal protection clauses of the United States and California Constitutions.
*1459I
FACTUAL AND PROCEDURAL HISTORY
A. The Offenses
On May 28, 2008, at approximately 1:00 a.m., Officer Rodriguez of the California Highway Patrol stopped a speeding vehicle on Interstate 8. A.G. was driving, and was the sole occupant of, the vehicle. Rodriguez asked A.G. why she was speeding, and A.G. responded that she was trying to arrive home before her parents. Rodriguez also noticed signs A.G. had been consuming alcohol and administered two field sobriety tests. Although he concluded A.G. had been drinking alcohol, and the amended petition included the allegation that A.G. had violated Vehicle Code section 23136, subdivision (a), that allegation was dismissed at trial.
B. The Hearings
Defense counsel objected to the amended petition to the extent it added the alleged San Diego curfew violation. Defense counsel argued that the “[section] 625.5[, subdivision] (d) process has [not] been followed,” and a true finding for violating curfew based merely on her “passing through a town” would deny A.G. her rights under both the federal and state Constitutions. The court noted A.G.’s objections but proceeded with trial. After hearing the evidence and further argument, the trial court entered true findings that A.G. violated San Diego Municipal Code section 58.0102 and Vehicle Code section 22349, subdivision (a), and found she was a person described in sections 601 and 602.
C. The Appellate Proceedings
After the parties filed their initial briefs, and responded to this court’s inquiry with supplemental briefs focusing on the validity of San Diego Municipal Code section 58.0102 under the equal protection clauses, and after hearing oral argument, this court filed its initial opinion in this matter (People v. A.G. (D053991, rehg. granted Mar. 5, 2010)) concluding San Diego Municipal Code section 58.0102 was invalid under equal protection principles. Our conclusion was based, in part, on the fact that San Diego Municipal Code section 58.0102, former subdivision (c)(7), provided a defense to prosecution when the minor was “attending an official school, religious, or other recreational activity supervised by adults and sponsored by the City of San Diego, a civic organization, or another similar entity that takes responsibility for the minor” (italics omitted), but did not permit the *1460minor to travel to or from those activities after 10:00 p.m. unless accompanied by an adult. (San Diego Mun. Code, § 58.0101.)
After People v. A.G. was filed, the People petitioned for rehearing. In support of the request for rehearing, the People conceded San Diego Municipal Code section 58.0102, subdivision (c)(7) contained no “coming and going” supplement to the activities exempted under that subdivision. However, the People informed this court, for the first time, that the curfew ordinance (ostensibly codified in San Diego Mun. Code, § 58.0102) did contain a “coming and going” supplement for “attending an official school, religious, or other recreational activity supervised by adults and sponsored by the City of San Diego, a civic organization, or another similar entity that takes responsibility for the minor.” (San Diego Ord. No. 0-18416, § 2; San Diego Mun. Code, § 58.0102, subd. (c)(7).) This court granted the petition for rehearing, and asked the parties to file supplemental briefs addressing several key issues raised by the discrepancy between the curfew ordinance and the incomplete codification of that ordinance in San Diego Municipal Code section 58.0102. First, does the discrepancy between an ordinance or statute enacting a law and the incomplete codification of the law raise additional issues that require evaluation by the court? Second, when a discrepancy exists between an ordinance or statute enacting a law and the codification of the law in a municipal or other code, which law must the court examine to evaluate constitutional challenges to a true finding of violation of the law? Finally, assuming this court must focus on City of San Diego Ordinance No. 0-18416 and disregard San Diego Municipal Code section 58.0102, did the presence of a “going to and returning home from” supplement to “attending an official school, religious, or other recreational activity” exception cure the infirmities discussed by this court in its initial opinion? Both parties have filed supplemental briefs, and we now evaluate the issues presented considering this newly disclosed landscape.
II
THE ORDINANCE RATHER THAN THE CODIFICATION IS THE RELEVANT LAW
As a preliminary matter, we first determine which version—the ordinance or the codification—is the relevant enactment for purposes of assessing A.G.’s various challenges to the true finding she violated the San Diego curfew.
The People argue, and A.G. concedes, numerous cases have stated that when there is a conflict between a challenged law as enacted and as codified, the court must treat the law as enacted as the relevant and *1461controlling law. (See Stephan v. United States (1943) 319 U.S. 423, 426 [87 L.Ed. 1490, 63 S.Ct. 1135]; United States v. Welden (1964) 377 U.S. 95, 98, fn. 4 [12 L.Ed.2d 152, 84 S.Ct. 1082]; U.S. v. Ward (3d Cir. 1997) 131 F.3d 335, 339-340.) The codification of statutory enactments serves to compile and publish the enactments, but “the fact that published versions of the . . . Code do not include [all of the enactment] is of no moment. ‘A compilation of laws ... is merely a systematic arrangement of all the statutes of a particular state published to facilitate the discovery of the law .... The omission of statutes from the compilation, disastrous as it may be to the hurried lawyer in search of the statutory material, is without effect and if the statute is still in force its omission from the compilation is without legal significance.’ (1A Sutherland, Statutory Construction (4th ed. 1973) § 28.04, p. 318.)” (People v. Andrade (1983) 141 Cal.App.3d Supp. 36, 40 [190 Cal.Rptr. 738].) The codification “cannot prevail over the [enactment] when the two are inconsistent” (Stephan v. United States, supra, 319 U.S. at p. 426), and accordingly, “when there is a conflict during the process of codification, the Act as originally passed controls.” (State v. Hicks (Tenn.Crim.App. 1992) 835 S.W.2d 32, 37.)
Although A.G. asserts the language in the above-cited cases was dicta, at least one of the cases—U.S. v. Ward, supra, 131 F.3d 335—involved resolution of a conflict between the enactment and the codification necessary to the decision. In Ward, the issue was whether the trial court had properly ordered the defendant to be tested for the presence of HIV. At trial, the prosecution argued the court had the power to order the testing for the presence of HIV pursuant to the Violence Against Women Act (Pub.L. No. 103-322 (Sept. 13, 1994) 108 Stat. 1902, 1945-50), codified in part at title 42 United States Code sections 10607(c) and 14011 (1995). The trial court rejected the Violence Against Women Act as a basis for permitting the test, finding it “void” because a codification defect did not specify which individuals were subject to testing for the presence of HIV, even though the Statutes at Large did identify which individuals would be subject to testing. (Ward, at pp. 338-339.) The appellate court held that, although the codification errors resulted in “a clear conflict between the codification and Statutes-at-Large version of the Act. . . . the Code cannot prevail over the Statutes at Large when the two are inconsistent.’ . . . When there is such a conflict, the version in the Statutes at Large . . . must control.” (Ward, at pp. 339-340, quoting Stephan v. United States, supra, 319 U.S. at p. 426.) The court concluded that because “the codified version of the Act was not the fault of Congress, but of the codifiers [and] the Act gave the district court authority to order the accused to undergo a blood test if the showing prescribed [by the Act] was made” (Ward, at p. 340), the appellate court remanded the case to the district court with directions to apply the act and to make the act’s factual findings to assess whether to order the testing. (131 F.3d at p. 343.)
*1462We are convinced by the foregoing authorities that, at least to the extent we assess A.G.’s challenge to the true finding on the ground that she had not received the prior warning as provided in section 625.5,2 we must assess the provisions contained in San Diego Ordinance No. 0-18416 (and concomitantly disregard San Diego Mun. Code, § 58.0102 to the extent it differs from San Diego Ord. No. 0-18416) to resolve that claim.
Ill
THE SAN DIEGO CURFEW ORDINANCE
The San Diego curfew ordinance provides it is unlawful for any minor to be present in any public place or on the premises of any establishment within the City of San Diego between the hours of 10:00 p.m. any evening of the week, until 6:00 a.m. the following day. (San Diego Ord. No. 0-18416, § 2; San Diego Mun. Code, §§ 58.0101, 58.0102, subd. (a).) However, the curfew ordinance (San Diego Ord. No. 0-18416, § 2; San Diego Mun. Code, § 58.0102, subd. (c)) also specifies that it is a defense to prosecution under that ordinance when the minor is:
“(1) accompanied by the minor’s parent or guardian, or by a responsible adult;
“(2) on an errand at the direction of the minor’s parent or guardian, or the responsible adult, without any detour or stop;
“(3) in a motor vehicle involved in interstate travel;
“(4) engaged in an employment activity, or going to or returning home from an employment activity, without any detour or stop;
“(5) involved in an emergency;
“(6) on the sidewalk abutting the minor’s residence;
*1463“(7) attending an official school, religious, or other recreational activity supervised by adults and sponsored by the City of San Diego, a civic organization, or another similar entity that takes responsibility for the minor, or going to or returning home from, without any detour or stop, an official school, religious, or other recreational activity supervised by adults and sponsored by the City of San Diego, a civic organization, or another similar entity that takes responsibility for the minor;
“(8) exercising First Amendment rights protected by the United States Constitution; or
“(9) emancipated pursuant to law.”3
The San Diego curfew ordinance provides that, before taking any enforcement action under this section, a police officer must ask the apparent offender’s age and reason for being in the public place or on the premises of the establishment during curfew hours, and shall not issue a citation or make an arrest under this section unless the officer reasonably believes an offense has occurred and, based on any responses and other circumstances, none of the above defenses under the curfew ordinance are applicable.
IV
THE STATUTORY INTERPRETATION CLAIM
A.G. does not assert, under the strict terms of the San Diego curfew ordinance, there was no evidence to support the true finding. Instead, A.G. relies on section 625.5 as mandating that a juvenile can be found in violation of a curfew ordinance only if the juvenile had previously been issued a warning citation for a curfew violation. A.G. argues that In re Justin B. (1999) 69 Cal.App.4th 879 [81 Cal.Rptr.2d 852] held section 625.5 was intended to occupy the field, and therefore asserts the San Diego curfew ordinance contains an implied element that, before a juvenile can be found in violation of that ordinance, the prosecution must plead and prove the juvenile had previously been issued a warning citation. From this predicate, A.G. asserts the true finding must be reversed because the prosecution neither pleaded nor proved A.G. had previously been issued a warning citation for a curfew violation.
*1464Section 625.5 provides it shall “only apply to a city, county, or city and county in which the governing body of the city, county, or city and county has enacted an ordinance prohibiting minors from remaining in or upon the public streets unsupervised after hours and has adopted a resolution to implement this section.” (Id., subd. (b).) Section 625.5 provides:
“(c) Except as provided in subdivision (d), law enforcement personnel are authorized to temporarily detain any minor upon a reasonable suspicion based on articulable facts that the minor is in violation of the ordinance described in subdivision (b) and to transport that minor to his or her place of permanent or temporary residence within the state, whether the place of residence is located within or without the jurisdiction of the governing body, or to the custody of his or her parents or legal guardian. . . .
“(d) Upon the first violation of the ordinance described in subdivision (b), the law enforcement officer shall issue to the minor a warning citation regarding the consequences of a second violation of the ordinance. A designated representative of the governmental entity issuing the citation shall mail to the parents of the minor or legal guardian a notification that states that upon a second violation, the parents or legal guardian may be held liable for actual administrative and transportation costs, and that requires the parents or legal guardian to sign and return the notification. This notification shall include a space for the explanation of any circumstances relevant to an applicable exemption from the fee as provided by subdivision (e). This explanation shall be reviewed by a designated representative of the governmental entity that issued the citation and notification. If the explanation is found to be insufficient, the representative may request a consultation with the parents or legal guardian for the purpose of discussing the circumstances claimed to be relevant to an applicable exemption.
“(e) A fee for the actual costs of administrative and transportation services for the return of the minor to his or her place of residence, or to the custody of his or her parents or legal guardian, may be charged jointly or severally to the minor, his or her parents, or legal guardian, in an amount not to exceed those actual costs. Upon petition of the person required to pay the fee, the governmental entity issuing the citation shall conduct a hearing as to the validity of the fees charged, and may waive payment of the fee by the minor, his or her parents, or legal guardian, upon a finding of good cause. If authorized by the governing body, the city, county, or city and county may charge this fee, in which case the city, county, or city and county may (1) provide for waiver of the payment of the fee by the parents or legal guardian upon a determination that the person has made reasonable efforts to exercise supervision and control over the minor, (2) provide for a determination of the ability to pay the fee and provide that the fee may be waived if *1465neither the minor nor the parents or legal guardian has the ability to pay the fee, (3) provide for the performance of community service in lieu of imposition of the fee, and (4) provide for waiver of the payment of the fee by the parents or legal guardian upon a determination that the parents or legal guardian has limited physical or legal custody and control of the minor.”
We construe section 625.5 to determine whether the Legislature intended by that enactment to preclude cities or counties from treating curfew violations as misdemeanors when the juvenile has not previously received the warning citation described in subdivision (d). In construing a statute, we apply settled rules of statutory construction: “ ‘When construing a statute, we must “ascertain the intent of the Legislature so as to effectuate the purpose of the law.” ’ [Citation.] ‘[W]e begin with the words of a statute and give these words their ordinary meaning.’ [Citation.] ‘If the statutory language is clear and unambiguous, then we need go no further.’ [Citation.] If, however, the language supports more than one reasonable construction, we may consider ‘a variety of extrinsic aids, including the ostensible objects to be achieved, the evils to be remedied, the legislative history, public policy, contemporaneous administrative construction, and the statutory scheme of which the statute is a part.’ [Citation.] Using these extrinsic aids, we ‘select the construction that comports most closely with the apparent intent of the Legislature, with a view to promoting rather than defeating the general purpose of the statute, and avoid an interpretation that would lead to absurd consequences.’ [Citation.]” (People v. Sinohui (2002) 28 Cal.4th 205, 211-212 [120 Cal.Rptr.2d 783, 47 P.3d 629].)
We are convinced section 625.5 was not intended to superimpose a prior warning requirement before an ordinance may validly treat a curfew violation as a misdemeanor. First, section 625.5 by its own terms specifies it shall only apply when the governing body has (1) enacted an ordinance prohibiting minors from remaining in or upon the public streets unsupervised after hours, and (2) “has adopted a resolution to implement this section.” (§ 625.5, subd. (b), italics added.) Thus, the legislative language on its face shows section 625.5 has no application unless the governing body has opted into the provisions of section 625.5 by adopting an implementation resolution, and A.G. has not cited any basis for concluding the City of San Diego has adopted that resolution. (Cf. In re Charles C. (1999) 76 Cal.App.4th 420, 426, fn. 4 [90 Cal.Rptr.2d 430] [limitations imposed by § 625.5 inapplicable where no resolution adopted].)
More importantly, we are convinced section 625.5 was not designed to define the minimum elements of a curfew offense in California. Instead, its primary purpose is to relieve cities and counties of one of the fiscal burdens caused by curfew violators, and concomitantly to provide financial disincentives for minors and their parents to ignore curfew laws, by providing a *1466mechanism by which the costs associated with detaining and transporting minors who violate curfew regulations are borne by the parents and/or minors rather than by the general public. Section 625.5 expressly stated it was “the intent of the Legislature in enacting this section to accomplish the following purposes: [f] (1) To safeguard the fiscal integrity of cities and counties by enabling them to recoup the law enforcement costs of identifying, detaining, and transporting minors who violate curfew ordinances to their places of residence^] [f] (2) [t]o encourage parents and legal guardians to exercise reasonable care, supervision, and control over their minor children so as to prevent them from committing unlawful acts[,] [and] [f] (3) [t]o help eradicate criminal street gang activity.” (§ 625.5, subd. (a).) To accomplish those purposes, the statutory scheme contemplates that, “[e]xcept as provided in subdivision (d),” when an officer suspects the minor is in violation of the curfew ordinance, the officer may detain the minor and transport that minor to his or her place of permanent or temporary residence (§ 625.5, subd. (c)), and the minor or parent may be required to pay the costs associated with that law enforcement activity (§ 625.5, subd. (e)). The subdivision (d) exception provides that, “[u]pon the first violation of the ordinance described in subdivision (b), the law enforcement officer shall issue to the minor a warning citation regarding the consequences of a second violation of the ordinance,” and requires that a notification be sent to the parents or legal guardian stating they may be held liable for actual administrative and transportation costs if there is a second violation. (§ 625.5, subd. (d).)
The apparent intent behind section 625.5 is not to superimpose a prior citation element into all curfew ordinances, but is instead to impose a “prior citation/notice to parents” requirement if the governing body wishes to take advantage of section 625.5’s authorization for recouping from a parent or minor the law enforcement costs associated with a second violation. Even assuming the City of San Diego had adopted a resolution implementing section 625.5, the prior citation requirement would be relevant only to actions for recoupment against the minor or parent, and would be irrelevant to whether the minor violated the underlying curfew ordinance.
A.G.’s reliance on In re Justin B., supra, 69 Cal.App.4th 879 is misplaced. The issue in that case was not whether the minor had violated the curfew ordinance; to the contrary, the minor was not even charged with that offense. Instead, the sole issue was whether a minor could be arrested and subjected to a lengthy detention and custodial interrogation at a police station based on a curfew violation. The Justin B. court, relying on an Attorney General opinion that stated a curfew violation would not permit transporting the minor to the police station and subjecting him to a custodial interrogation at a police station (id. at p. 890), as well as its view that section 625.5 limited the types of actions a police officer may take and did not include arrest and custodial interrogations (Justin B., at pp. 888-889), concluded the statements by the *1467minor were the product of an unlawful search and seizure (id. at p. 890). Even assuming Justin B. was correctly decided (but see In re Charles C., supra, 76 Cal.App.4th at pp. 425-428 [concluding Justin B. was wrongly decided]), it has no application here because there is no claim A.G. was wrongly detained or interrogated.
V
THE DISCREPANCY BETWEEN THE ORDINANCE AND THE CODIFICATION, WHEN COUPLED WITH THE CHARGE CONTAINED IN THE PETITION, VIOLATED A.G.’S DUE PROCESS RIGHTS
A.G.’s supplemental brief, responding to this court’s inquiries after we granted the People’s petition for rehearing, argued that the discrepancy between the curfew ordinance and the codification of that ordinance offended the fair-notice protection encompassed by the due process clause, and the true finding she violated the curfew ordinance must therefore be reversed.
With exceptions not pertinent here, it is “[w]ithout a doubt [that] a juvenile in a delinquency matter is entitled to the same constitutional guarantees of due process as those accorded an adult criminal defendant. (In re Gault (1967) 387 U.S. 1, 30-31 [18 L.Ed.2d 527, 87 S.Ct. 1428].) This includes constitutionally adequate notice of the charges.” (In re Jesse P. (1992) 3 Cal.App.4th 1177, 1182 [5 Cal.Rptr.2d 321].) As further observed by the Jesse P. court, “ ‘[t]he “preeminent” due process principle is that one accused of a crime must be “informed of the nature and cause of the accusation.” (U.S. Const., Amend. VI.) Due process of law requires that an accused be advised of the charges against him so that he has a reasonable opportunity to prepare and present his defense and not be taken by surprise by evidence offered at his trial.’ (People v. Jones (1990) 51 Cal.3d 294, 317 [270 Cal.Rptr. 611, 792 P.2d 643] . . . .)” (In re Jesse R, at p. 1182, citation omitted; accord, In re Jonathan T. (2008) 166 Cal.App.4th 474, 482-484 [82 Cal.Rptr.3d 753] [court sustained petition against a juvenile that charged home invasion robbery under Pen. Code, § 211 but failed adequately to allege element of “acting in concert” as Pen. Code, § 213 enhancement; held due process precluded court from imposing term of confinement premised on acting in concert enhancement].)
In this case, the amended petition alleged A.G. violated San Diego Municipal Code section 58.0102, not that she had violated San Diego Ordinance No. 0-18416. Because section 58.0102 of the San Diego Municipal Code omitted an important exception to the curfew law’s proscriptions, the charging document necessarily deprived A.G. of the required notice of the *1468elements of the offense with which she was charged.4 Because an essential component of due process is that a penal statute must permit “[o]rdinary people of common intelligence ... to be able to understand what is prohibited by the statute and what may be done without violating its provisions” (People v. Ellison (1998) 68 Cal.App.4th 203, 207 [80 Cal.Rptr.2d 120]), and A.G. was charged with violating a statute that in fact did not permit a person of ordinary intelligence to know what conduct could be engaged in without violating its provisions, we conclude the discrepancy between the ordinance and the codification, when coupled with the charge contained in the petition, violated A.G.’s due process rights.
DISPOSITION
The true finding that A.G. violated San Diego Municipal Code section 58.0102 is reversed. In all other respects the judgment is affirmed.
Huffman, Acting P. J., and Nares, J., concurred.
All further statutory references are to the Welfare and Institutions Code unless otherwise specified.
Although our conclusion below-—that the true finding must be vacated because deficiencies in the charging documents violated due process protections afforded to all citizens—technically moots A.G.’s statutory interpretation argument under section 625.5, we nevertheless exercise our discretion to reach that argument because it is a matter of continuing public interest and the issue is likely to recur. (See generally Nebel v. Sulak (1999) 73 Cal.App.4th 1363, 1367-1368 [87 Cal.Rptr.2d 385].) Additionally, jurisprudential restraint cautions that a court should only reach constitutional questions if the matter cannot be resolved on nonconstitutional grounds (see generally Sanchez v. City of Modesto (2006) 145 Cal.App.4th 660, 671 [51 Cal.Rptr.3d 821]), and because the concurring opinion concludes the San Diego curfew ordinance is invalid under the equal protection clauses of the United States and California Constitutions, an initial evaluation of A.G.’s nonconstitutional challenge to the true finding is appropriate.
San Diego Municipal Code section 58.0102, subdivision (c)(7) provides that there is a defense to prosecution when the minor is: “attending an official school, religious, or other recreational activity supervised by adults and sponsored by the City of San Diego, a civic organization, or another similar entity that takes responsibility for the minor.” However, this codification does not include a “going to or returning” provision within the defense.
We need not decide in this case whether the “going and coming” exception “is descriptive of or an element of the offense charged [which] must be negatived in the pleading [citation], [or instead constitutes an] exception[] [which is) not a part of the statute defining the offense and constitute a matter of defense [which renders] the pleading . . . sufficient without any allegation showing that the exception does not exist.” (People v. Mason (1960) 184 Cal.App.2d 317, 356 [7 Cal.Rptr. 627].) Instead, it is the omission from the municipal code of any mention of the exception that is dispositive, because it precluded either the prosecution from alleging its nonexistence or the defense from interposing the exception as an affirmative defense.