
193 Cal.App.3d 851 (1987)
238 Cal. Rptr. 535
In re ROBERT J. MONTERROSA on Habeas Corpus.
Docket No. H002199.
Court of Appeals of California, Sixth District.
July 20, 1987.
*853 COUNSEL
John K. Van de Kamp, Attorney General, Morris Lenk and Paul D. Gifford, Deputy Attorneys General, for Appellant.
J. Courtney Shevelson, under appointment by the Court of Appeal, for Respondent.
OPINION
CAPACCIOLI, J.
The issue in this case is whether the presentence credits belatedly awarded to defendant Robert J. Monterrosa should, instead of advancing his parole discharge date, have been applied to reduce his parole revocation confinement. The trial court granted defendant's petition for a writ of habeas corpus and ordered his release. The People appealed. We reverse.
The facts are undisputed. Defendant was arrested in 1981 and sentenced in 1982 for vehicle theft. He was released on parole in December 1983. In February 1984, his parole was revoked and he was returned to prison for four months. In June 1984, shortly after his rerelease to parole, defendant became a parolee-at-large and his parole was suspended.
On March 14, 1985, the First Appellate District filed an opinion awarding defendant an additional 121 days of presentence credit under Penal Code section 2900.5 for time he spent in prison between December 1981 and March 1982, prior to sentencing on the vehicle theft charge.[1] The Board of Prison Terms deducted this credit from defendant's parole period, advancing his parole discharge date.
In July 1985, defendant was rearrested. His parole was revoked in September and he was ordered returned to custody for 12 months, pursuant to section 3057, subdivision (a). This period would have expired in July 1986.
In April 1986, after unsuccessful administrative appeals, defendant filed a petition for a writ of habeas corpus in the Monterey County Superior Court. *854 He alleged that his 121-day additional presentence custody credit should have been applied to reduce his parole revocation confinement term, rather than to advance his parole discharge date. Had the credit been applied in such a fashion, his parole revocation confinement term would have expired by the time the writ petition was filed. The superior court granted the petition and ordered defendant's release. The People appealed.
(1) We first conclude that the appeal is not moot because defendant has been released from his parole revocation confinement. His parole discharge date remains at issue. Even were defendant to be discharged from parole while this appeal was pending, the issue may recur and is of public importance. (Sierra Club v. Board of Supervisors (1981) 126 Cal. App.3d 698, 708 [179 Cal. Rptr. 261].) "`Where questions of public concern are involved, particularly in the area of the supervision of the administration of criminal justice [the court] may reject mootness as a bar to the decision on the merits.' [Citation.]" (In re Brindle (1979) 91 Cal. App.3d 660, 670 [154 Cal. Rptr. 563].)
(2a) On the merits of the appeal, we conclude that defendant's belatedly awarded 121-day presentence credit was correctly applied by the Board of Prison Terms to advance his parole discharge date. Defendant argues that a contrary result is mandated by the application of section 2900.5, subdivision (c). Section 2900.5, subdivision (a), provides that time in custody shall be credited upon a defendant's term of imprisonment. This phrase is defined in section 2900.5, subdivision (c), as including "any period of imprisonment prior to release on parole and any period of imprisonment and parole, prior to discharge...."
Defendant argues that a period of parole revocation confinement, since it occurs prior to discharge from parole, is necessarily included within this definition. The People argue that this confinement is neither part of defendant's original sentence nor of his parole. Since both constructions are reasonable, this court must ascertain the intent of the Legislature to determine the correct construction of the statute.
Since it is unclear from the language of the statute which construction was intended, this court will look to the purpose of the law to ascertain the Legislature's intent. (3) The legislative purpose of section 2900.5 is two-fold: to provide equal treatment for indigent defendants who could not post bail and were forced to serve a longer period of confinement than their wealthier counterparts (In re Rojas (1979) 23 Cal.3d 152, 156 [151 Cal. Rptr. 649, 588 P.2d 789]; People v. Esparza (1986) 185 Cal. App.3d 458, 463 [229 Cal. Rptr. 739]), and to equalize the actual time served in custody for given offenses (In re Atiles (1983) 33 Cal.3d 805, 812 [191 Cal. Rptr. 452, *855 662 P.2d 910]; People v. Riolo (1983) 33 Cal.3d 223, 228 [188 Cal. Rptr. 371, 655 P.2d 723]). Since the defendant's excess prison time was neither a result of his inability to post bail nor of any unequal treatment in sentencing, neither of these purposes would be served by construing the statute as the defendant suggests.
(4) We must also look to section 2900.5 as a whole to determine the correct application of defendant's presentence credits, since statutes should be construed with reference to the whole system of law of which they are a part so that all may be harmonized and have effect. (Brown v. Superior Court (1984) 37 Cal.3d 477, 484 [208 Cal. Rptr. 724, 691 P.2d 272]). Section 2900.5, subdivision (b), requires that "credit shall be given only where the custody to be credited is attributable to proceedings related to the same conduct for which the defendant has been convicted." This court recently analyzed this language in People v. Esparza, supra. We traced its interpretation from In re Rojas, supra, to People v. Joyner (1984) 161 Cal. App.3d 364 [207 Cal. Rptr. 636]. As we stated in Esparza, with the exception of People v. Schaaf (1983) 150 Cal. App.3d 45 [197 Cal. Rptr. 458], the cases interpreting section 2900.5, subdivision (b), have considered the underlying cause of a defendant's custody in determining whether presentence credits should be applied towards it. (5) Where there is a causal relationship between a defendant's custody and the acts for which he or she has been convicted, presentence credit should be allowed. Where this custody is based solely on unrelated offenses, however, no presentence credit should be given. (Esparza, supra, 185 Cal. App.3d at p. 468.)
In defendant's case, his parole revocation confinement was not a result of the vehicle theft for which he was originally sentenced, but was based on multiple violations of his parole, including having been a parolee-at-large for over a year. His custody was thus for "offenses" unrelated to the vehicle theft for which he was convicted and for which he should have received an additional 121 days presentence credit against his sentence. (2b) We are persuaded that consistent with prior interpretations of section 2900.5, subdivision (b), defendant's presentence credit should not have been applied to reduce his parole revocation confinement term.
It is true, as the trial court stated in its decision on defendant's petition, that had he received his presentence credit in a timely fashion, he would have served 121 days less prison time. It is also true that reducing his parole period by the amount of the credit is not equivalent to applying it to shorten his prison term. Were we to uphold the relief fashioned by the trial court, however, we would be founding a "`"credit bank" to be used by criminals at appropriate times for deposits or withdrawals of credit against custodial time to be served for crimes not yet committed.'" (Esparza, supra, 185 *856 Cal. App.3d at pp. 467-468, quoting People v. Davis (1985) 169 Cal. App.3d 614, 618 [215 Cal. Rptr. 385].) The Board of Prison Terms would be required to "bank" the presentence credit which was awarded to defendant in March 1985, while he was a parolee-at-large, against the possibility that his parole would be revoked at some later date. It would then have to apply the belatedly awarded credit to shorten his parole revocation confinement term. This court is satisfied that the Legislature never intended such a result, and that it would be inconsistent with the purpose of the statute to apply section 2900.5 presentence credits in this fashion. Since the defendant's parole revocation confinement was unrelated to the vehicle theft for which he was sentenced, he was properly denied application of his belatedly awarded section 2900.5 presentence credit against his parole revocation confinement term. The Board of Prison Terms properly applied this credit to advance the defendant's parole discharge date. Order reversed.
BRAUER, J., Concurring in the judgment.
The lead opinion states that the construction of Penal Code section 2900.5, subdivision (c) contended for by the People and that advocated by the defendant are both reasonable. To the contrary, there can be no reasonable construction of the words "imprisonment and parole" (italics added) as those words are, in context, gibberish. Perhaps the Legislature meant "imprisonment on parole" i.e., imprisonment for parole violation. I hope our lawmakers will clarify their intent.
I join in the decision.
AGLIANO, P.J., Dissenting.
I would affirm. The trial court correctly decided that once the determinate sentence has been served, the unused presentence credits are to be applied, in this case, to the ensuing period of imprisonment ordered upon revocation of petitioner's parole. While Penal Code section 2900.5, subdivision (c) is not a model of clarity, it sufficiently dictates that the unused credits be applied to such period of imprisonment.
Subdivision (c) defines the "term of imprisonment" to which presentence credits are to be applied as including "any period of imprisonment prior to release on parole and any period of imprisonment and parole, prior to discharge, ..." The Legislature thus identifies two periods of imprisonment to which presentence credits might apply  the prison term imposed by the court and any period of imprisonment ordered by the Board of Prison Terms upon parole revocation. The sentencing scheme, in the context of determinate sentencing, indeed contemplates that the defendant will, unless waived by the Board, be on parole for up to three years (Pen. Code, §§ 1170, subds. (c) and (e), 3000), and that he may be reconfined while on parole (Pen. Code, § 3057). As provided in Penal Code section 3056, *857 "[p]risoners on parole shall remain under the legal custody of the department and shall be subject at any time to be taken back within the inclosure of the prison."
The majority restricts the application of presentence credits to the prison term imposed by the court and beyond that, to the period of parole only. This view gives no effect to the statute's words that the credits also be applied to the period of "imprisonment and parole" in addition to the period of imprisonment prior to release on parole. It also ignores the rule that "[i]n the construction of a statute ... the judge is simply to ascertain and declare what is in terms or in substance contained therein, not to insert what has been omitted, or to omit what has been inserted; and ... such a construction is, if possible, to be adopted as will give effect to all." (Code Civ. Proc., § 1858; Weber v. County of Santa Barbara (1940) 15 Cal.2d 82, 86 [98 P.2d 492].)
I further disagree with the majority's resort to subdivision (b) of section 2900.5 as an aid to statutory construction. Subdivision (b) deals with the completely unrelated problem of credit allocation when multiple charges underlie presentence confinement. We do not, in the case before us, face an issue of multiple credits for a single period of confinement. (Cf. People v. Esparza (1986) 185 Cal. App.3d 458 [229 Cal. Rptr. 739].) In fact, somewhat the converse is true.
A petition for a rehearing was denied August 20, 1987, pursuant to rule 27(e), California Rules of Court. Respondent's petition for review by the Supreme Court was denied October 29, 1987.
NOTES
[1]  All further statutory references are to the Penal Code unless otherwise stated.
