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. *854He 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.
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].)
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. The legislative purpose of section 2900.5 is twofold: 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, *855662 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.
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 eifect. (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. 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. 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 *856Cal.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.
All further statutory references are to the Penal Code unless otherwise stated.