
55 Cal.Rptr.3d 473 (2007)
148 Cal.App.4th 240
The PEOPLE, Plaintiff and Respondent,
v.
Earl DAVENPORT, Defendant and Appellant.
No. B194281.
Court of Appeal of California, Second District, Division Five.
March 1, 2007.
California Appellate Project, Jonathan B. Steiner, Executive director, Richard L. Fitzer, Staff Attorney, under appointments by the Court of Appeal, for Defendant and Appellant.
Edmund G. Brown, Jr., Attorney General, Mary Jo Graves and Dane R. Gillette, Chief Assistant Attorneys General, Pamela C. Hamanaka, Senior Assistant Attorney General, Mary Sanchez, Anna R. Duarte and Robert F. Katz, Deputy Attorneys General, for Plaintiff and Respondent.
KRIEGLER, J.
Following his 2004 narcotics possession conviction, defendant was placed on probation conditioned on his participation and completion of an appropriate drug treatment program, pursuant to Proposition 36, *474 the Substance Abuse Crime Prevention Act of 2000, (Pen.Code, §§ 1210-1210.5).[1] Defendant's probation was later revoked. The trial court imposed a two-year prison term, but refused to credit defendant for the 88 days he spent in a residential drug treatment program as part of his Proposition 36 sentence. The trial court ruled as a matter of law that time spent in a drug treatment program as a condition of probation under Proposition 36 cannot be credited against a subsequent prison term following probation revocation. Defendant timely appeals the trial court's denial of his motion to correct the award of presentence custody credits. We reverse and order that defendant receive an additional 88 days of custody credits.

PROCEDURAL BACKGROUND[2]
On September 22, 2004, defendant pled guilty to possession of a controlled substance in violation of Health and Safety Code section 11350. He was granted probation pursuant to Proposition 36, but probation was subsequently revoked. On May 5, 2006, defendant was sentenced to state prison for the midterm of two years. Defendant initially received credit for 258 days, consisting of 172 days actually spent in local custody and 86 days of conduct credits. On August 7, 2006, in connection with defendant's motion to correct the award of presentence credits, the trial court recognized there had been a miscalculation and amended the abstract of judgment to reflect an additional 32 days of actual custody credits and 16 days of conduct credits for a total of 306 days. The trial court refused to award custody credits pursuant to section 2900.5 for time defendant spent in a residential drug treatment program.
On August 17, 2006, the trial court denied defendant's motion for an additional 88 days of conduct credit to reflect the time he spent in a residential rehabilitation program. At that hearing, defense counsel offered documentation to establish that defendant had participated in a residential rehabilitation program with Volunteers of America from May 19, 2005, through August 14, 2005, and that the program qualified as a residential rehabilitation program for purposes of section 2900.5.[3] Neither the trial court nor the prosecutor took issue with defendant's evidence that he had spent 88 days in a residential rehabilitation program pursuant to his Proposition 36 grant of probation.
The trial court denied defendant's motion for the additional 88 days of custody credits on legal, not factual, grounds. The trial court ruled as a matter of law that time spent in a rehabilitation program as a condition of Proposition 36 probation was not custodial for purposes of receiving credits under section 2900.5. The trial court began its analysis by noting that Proposition 36 precludes the imposition of jail time for those who qualify for drug treatment placement. Next, it pointed to language in section 2900.5, subdivision (f), *475 that limits the availability of credit for participation in rehabilitation programs to situations in which the time was served "in lieu of time in jail.[4] The trial court reasoned that a person like defendant, who participates in a residential rehabilitation program under the auspices of Proposition 36, could not have done so "in lieu of serving time in jail and, therefore, that person was outside the purview of subdivision (f)  making him or her ineligible for custody credits.

DISCUSSION
Defendant argues our Supreme Court has made it clear that he is entitled to credit against his post-revocation prison term for the time he spent in a residential drug treatment facility as a condition for probation, and that neither the enactment of Proposition 36 nor the application of section 2900.5, subdivision (f) supports a contrary finding. The Attorney General concedes that appellate precedent is consistent with defendant's position. Defendant's position is correct.
As our Supreme Court has explained, "[t]he provisions of . . . section 2900.5  entitling a defendant sentenced either to county jail or state prison to credit against the term of imprisonment for days spent in custody before sentencing as well as those served after sentencing as a condition of probation  apply to custodial time in a residential treatment facility as well as straight county jail time." (People, v. Jeffrey (2004) 33 Cal.4th 312, 318, 14 Cal. Rptr.3d 852, 92 P.3d 345 (Jeffrey); People v. Johnson (2002) 28 Cal.4th 1050, 1053, 123 Cal.Rptr.2d 700, 51 P.3d 913 (Johnson) ["Under section 2900.5, a defendant sentenced either to county jail or to state prison is entitled to credit against the term of imprisonment for days spent in custody before sentencing as well as those served after sentencing as a condition of probation. [Citations.] This provision also applies to custodial time in a residential treatment facility."]; People v. Thurman (2005) 125 Cal.App.4th 1453, 1460, 23 Cal. Rptr.3d 659 (Thurman) [same].)
Under section 2900.5, subdivisions (a) and (b), entitlement to credits for time spent in a residential rehabilitation facility depends on whether such participation was a condition of probation for the same underlying criminal conduct. "It is not the procedure by which a defendant is placed in a facility that determines the right to credit, but the requirement that the placement be `custodial,' and that the custody be attributable to the proceedings relating to the same conduct for which the defendant has been convicted. [Citations.] Courts have given the term `custody' as used in section 2900.5 a liberal interpretation." (People v. Darnell (1990) 224 Cal. App.3d 806, 809, 274 Cal.Rptr. 110 (Darnell).) Proposition 36 placement in a drug treatment program is perfectly consistent with those criteria for custody credits. Section 1210.1, subdivision (a) provides in pertinent part: "[A]ny person convicted of a nonviolent drug possession offense shall receive probation. As a condition of probation the court shall require participation in and completion of an appropriate drug treatment program."
Nevertheless, the trial court interpreted section 2900.5, subdivision (f) to exclude Proposition 36 drug treatment placement because subdivision (f) grants custody *476 credits for time spent in residential facilities only if it is served "in lieu of imprisonment in a county jail." The trial court reasoned that while Proposition 36 requires participation in a drug treatment program, it also proscribes the sentencing court from imposing incarceration as an additional condition of probation (§ 1210.1, subd. (a)). We disagree with the interpretation of the trial court and hold that the clear and unambiguous language of section 2900.5, subdivision (f) does not preclude custody credits for time spent in a residential rehabilitation program as a condition of Proposition 36 probation. (See Darnell, supra, 224 Cal.App.3d at p. 811, 274 Cal. Rptr. 110 ["If the statutory language is clear and unambiguous, there is no need for construction and courts should not indulge in it."].)
Section 2900.5, subdivision (f), resolves an arguable ambiguity in subdivision (a) of the same statute. Under subdivision (a), a defendant is entitled to custody credits for time spent in a rehabilitation facility in felony and misdemeanor cases. However, there are criminal statutes which require service of a mandatory period of time in county jail (see, e.g., § 647, subd. (l) [mandatory 45 and 90 day jail terms respectively for second and third convictions for prostitution offenses]; § 273.5, subd. (g) [mandatory 15 and 60 days jail sentences if probation is granted respectively for second and third convictions of willful infliction of corporal injury]; Health & Saf. Code, § 11550 [90-day mandatory minimum jail sentence for being under the influence of a controlled substance]). Section 2900.5, subdivision (f) clarifies that a defendant who spends time in a rehabilitation facility in lieu of mandatory imprisonment in a county jail is entitled to custody credit against the mandatory term. Subdivision (f) functions not as a limitation on the right to custody credits, but rather as an extension of that.right to a particular set of circumstances  where "the statute under which the defendant is sentenced requires a mandatory minimum period of time in jail," and the defendant served time in a rehabilitation facility (or other enumerated facility or program) "in lieu of imprisonment in a county jail." (§ 2900.5, subd. (f).) The trial court erred in ruling that section 2900.5, subdivision (f) limited defendant's right to custody credits for time spent in a rehabilitation facility as a condition of Proposition 36 probation.
Although our Supreme Court has not ruled on the precise question of whether section 2900.5, subdivision (f) serves to exclude Proposition 36 drug treatment placement from custodial status, we find its holdings in Jeffrey and Johnson dictate that it does not.[5] The Johnson court held that a trial court may condition a grant of probation on the express waiver of credits for time served, including time to be served in a residential drug treatment facility. (Johnson, supra, 28 Cal.4th at pp. 1052, 1054-1055, 123 Cal.Rptr.2d 700, 51 P.3d 913.) The Jeffrey court extended Johnson to hold that such a waiver as to future credits to be earned while in a residential treatment facility is a waiver "of such credits for all purposes, including application of such credits to a subsequently imposed prison term in the event probation is revoked." (Jeffrey, supra, 33 Cal.4th at p. 318, 14 Cal.Rptr.3d 852, 92 P.3d 345.) Implicit in those holdings is the recognition of a defendant's entitlement to *477 custody credits in the first place. (See also Thurman, supra, 125 Cal.App.4th at pp. 1461-1463, 23 Cal.Rptr.3d 659 [notwithstanding Proposition 36, trial court retains discretion to condition a grant or extension of probation upon a defendant's express, knowing, and intelligent waiver of past and future custody credits].)
The Attorney General argues the cause must be remanded to the trial court for additional findings as to whether defendant was entitled to credit for time spent at the Volunteers of America program. Specifically, the Attorney General argues defendant must establish he spent the asserted number of days there as a condition of probation for his 2004 drug conviction (see § 2900.5, subd. (a); Darnell, supra, 224 Cal.App.3d at p. 809, 274 Cal.Rptr. 110),[6] and that his participation in the program was sufficiently restricted to qualify as being custodial (see People v. Ambrose (1992) 7 Cal.App.4th 1917, 1921-1922, 9 Cal.Rptr.2d 812 (Ambrose)). As the Ambrose court explained, the term "`in custody' " has not been "precisely defined" for purposes of Penal Code section 2900.5, subdivision (a); however, both longstanding precedent and the statute's inclusive language to enumerate the types of qualifying facilities argue for a broad interpretation. (Ibid.) "The question of whether a particular facility should be regarded as sufficiently restrictive as to amount to custody constitutes a factual question [citation], even though certain facilities by their very nature involve some restraint on untrammeled liberty [citation]." (Id. at p.1922, 9 Cal.Rptr.2d 812.)
In the context of this case, we reject the Attorney General's suggestion. Defendant has twice requested credit for time spent at the Volunteers of America program. At no time has the trial court or prosecution suggested that Volunteers of America did not qualify as a rehabilitation facility for purposes of section 2900.5, or that defendant did not spend the 88 days in the program. Counsel for defendant had the documentation to establish these facts at the August 17, 2006 hearing, but was rebuffed by the trial court's statutory ruling. Defendant's minimum eligible parole date is either approaching or has already passed. A remand of this matter, with its attendant delay, will likely result in a loss of credits as defendant is scheduled for release from prison shortly. There is no point in reducing defendant's meritorious pursuit of custody credits to a Pyrrhic victory.

DISPOSITION
The August 17, 2006 order denying additional credits is reversed. The trial court is ordered to award defendant an additional 88 days of credit for time served pursuant to Penal Code section 2900.5 and to forward an amended abstract of judgment reflecting the additional credits to the Department of Corrections and Rehabilitation.
We concur: ARMSTRONG, Acting P.J., and MOSK, J.
NOTES
[1]  All further statutory references are to the Penal Code unless otherwise indicated.
[2]  The record on appeal is limited to the transcripts of the two hearings concerning defendant's motion to correct the award of presentence credits and the corresponding order and judgment. Accordingly, we do not discuss the facts of the underlying narcotics conviction or the subsequent probation violation.
[3]  Section 2900.5, subdivision (a) provides: "In all felony . . . convictions . . . when the defendant has been in custody, including, but not limited to, any time spent in a jail, . . . rehabilitation facility, . . . or similar residential institution, all days of custody of the defendant, including days served as a condition of probation in compliance with a court order . . . shall be credited upon his or her term of imprisonment. . . ."
[4]  Section 2900.5, subdivision (f) provides: "If a defendant serves time in a . . . rehabilitation facility, . . . similar residential facility, or home detention program in lieu of imprisonment in a county jail, and the statute under which the defendant is sentenced requires a mandatory minimum period of time in jail, the time spent in these facilities or programs shall qualify as mandatory time in jail."
[5]  Cf. People v. Bowen (2004) 125 Cal.App.4th 101, 108, footnote 4, 22 Cal.Rptr.3d 655 (enforcing waiver of presentence custody credits for the time spent in a residential drug treatment program, while "assuming] without deciding that a defendant who serves time in a court-ordered residential drug treatment program is entitled to presentence custody credits for that time").
[6]  In Darnell, supra, 224 Cal.App.3d at page 808, 274 Cal.Rptr. 110, the trial court had found that the defendant was released to an alcohol rehabilitation facility in connection with the relevant conduct for a certain number of days and that "the program was a custodial facility within the meaning of . . . section 2900.5."
