
169 Cal.App.3d 1108 (1985)
216 Cal. Rptr. 1
THE PEOPLE, Plaintiff and Respondent,
v.
ESTHER MARIE MERCURIO, Defendant and Appellant.
Docket No. D002767.
Court of Appeals of California, Fourth District, Division One.
July 9, 1985.
*1109 COUNSEL
Thacher, Hurst, Conaway & Zeidman and Dan Zeidman for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Jesus Rodriguez and Robert B. Shaw, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
WORK, J.
Esther Marie Mercurio appeals a judgment entered after she pleaded guilty to petty theft (Pen. Code,[1] § 484) and admitted being previously convicted of burglary and being imprisoned as a condition of probation. The sole issue on this appeal is whether the trial court erred in denying her presentence custody and conduct credits because she was assigned to a work furlough program of the California Department of Corrections and residing at a half-way house as part of a prison term imposed for the prior felony, when she committed and was arrested for her present offense. For the reasons which follow, we conclude the trial court properly denied her the cited credits and thus affirm the judgment.

FACTUAL AND PROCEDURAL BACKGROUND
On September 20, 1984, Mercurio was arrested for shoplifting $127.48 worth of baby clothes from the J.C. Penney Department Store. At the time of her arrest, she was residing in a half-way house for the remainder of a prison term for a prior conviction of burglary, due to expire in January 1985, and participating in a work furlough program. At sentencing, she argued she was entitled to presentence custody and conduct credits because her incarceration on September 20, 1984, continuing to the date of sentencing, February 8, 1985, was due to her arrest for petty theft and deprived her of the liberty and privileges associated with the work furlough program. *1110 She argued that when participating in the work furlough program while residing at a half-way house, she was neither on parole nor in custody, but free to work during the day among the public at large. Unpersuaded, the trial court denied her presentence custody and conduct credits. Impliedly, the trial court held she was in custody within the meaning of section 2900.5, subdivision (b) when assigned to the work furlough program.

DISCUSSION
Generally, a defendant is entitled to presentence credit for any time spent in custody before trial. (§ 2900.5, subd. (a).) More precisely, section 2900.5, subdivision (a) provides in pertinent part: "In all felony and misdemeanor convictions, either by plea or by verdict, when defendant has been in custody, including but not limited to any time spent in a jail, camp, work furlough facility, half-way house, ... prison, ... or similar residential institution, all days of custody of the defendant ... shall be credited upon his term of imprisonment...." However, this award of pretrial custody credit is not without limitation, as section 2900.5, subdivision (b) provides in pertinent part: "[C]redit 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...." Within the various potential contexts, this language has proved difficult to interpret and apply. (Compare for example People v. Ross (1985) 165 Cal. App.3d 368 [211 Cal. Rptr. 595], with People v. Veley (1984) 157 Cal. App.3d 1046 [204 Cal. Rptr. 83]; People v. Cornett (1985) 165 Cal. App.3d 752 [212 Cal. Rptr. 24], with People v. Joyner (1984) 161 Cal. App.3d 364 [207 Cal. Rptr. 636], and People v. Schaaf (1983) 150 Cal. App.3d 45 [197 Cal. Rptr. 458].) Looking to Supreme Court precedent for guidance, we note the following language in In re Watson (1977) 19 Cal.3d 646, 651 [139 Cal. Rptr. 609, 566 P.2d 243]: "[Section 2900.5] ... pertains to the pretrial incarceration of a person charged with crime but not yet tried much less convicted, and therefore clothed with the presumption of innocence. To implement the underlying philosophy of section 2900.5, the courts have therefore given the term `custody' as used in that section a liberal interpretation. (In re Jordan (1975) 50 Cal. App.3d 155, 157-158 [123 Cal. Rptr. 268], presentence time credit for time spent in federal medical center; People v. Meals (1975) 48 Cal. App.3d 215, 226 [121 Cal. Rptr. 742], presentence time credit although defendant also on parole hold prior to sentencing.) ...
"The crucial element of the statute is not where or under what conditions the defendant has been deprived of his liberty but rather whether the custody to which he has been subjected `is attributable to charges arising from the same criminal act or acts for which the defendant has been convicted.' (§ 2900.5, subd. (b).) In recognition of this element the courts have placed *1111 the emphasis on the fact of the defendant's custody prior to the commencement of his sentence regardless of the particular locale, institution, facility or environment of his incarceration...." (In re Watson, supra, 19 Cal.3d 646, 651-652; see also In re Rojas (1979) 23 Cal.3d 152, 156 [151 Cal. Rptr. 649, 588 P.2d 789].) Accordingly, consistent with the interpretation that credit shall be given only where the new custody is related to the same offense for which the defendant previously has been convicted, the Supreme Court in In re Rojas, supra, held that where the defendant has already been sentenced for a prior unrelated offense, his pretrial incarceration for a new charge cannot be attributed to the new proceedings and a defendant is not entitled to custodial credit against the new sentence. (Id., at pp. 155-156.) The Supreme Court commented: "There is no reason in law or logic to extend the protection intended to be afforded one merely charged with a crime to one already incarcerated and serving his sentence for a first offense who is then charged with a second crime. As to the latter individual the deprivation of liberty for which he seeks credit cannot be attributed to the second offense. Section 2900.5 does not authorize credit where the pending proceeding has no effect whatever upon a defendant's liberty." (In re Rojas, supra, 23 Cal.3d 152, 156.)
In In re Atiles (1983) 33 Cal.3d 805 [191 Cal. Rptr. 452, 662 P.2d 910], the Supreme Court held a parolee whose parole is revoked because of a new criminal offense may receive credit on that offense for the presentence custody period served for violating parole, because the conduct which led to the parole revocation also formed the basis for arrest and conviction on the new criminal charge. Consequently, under such circumstances, a defendant's custody on the parole revocation is "literally, `attributable to proceedings related to the same conduct for which the defendant has been convicted'...." (Id., at pp. 809-810.) The court explained: "In determining whether custody for which credit is sought under section 2900.5 is `attributable to proceedings leading to the conviction,' the sentencing court is not required to eliminate all other possible bases for the defendant's presentence incarceration. The court need only determine that the defendant was not already serving a term for an unrelated offense when restraints related to the new charge were imposed on him, and the conduct related to the new charge is a basis for those restraints. [Fn. omitted.] ...
"We are satisfied that the Legislature intended that `custody ... attributable to proceedings related to the same conduct for which the defendant has been convicted' include time in presentence custody during which a restraint or restraints related to that conduct made it impossible for the defendant to obtain his freedom, regardless of whether defendant was also subject to other restraints on his liberty." (In re Atiles, supra, 33 Cal.3d 805, 810-811.)
*1112 (1) Here, the trial court properly denied Mercurio presentence credit for the remainder of her term she was currently serving on a prior, unrelated offense (burglary). She had not yet completed that term of imprisonment when she was arrested on petty theft, and did not complete it until late January 1985 before sentencing on the petty theft. Mercurio challenges our conclusion and that of the trial court, arguing she suffered a substantial loss of freedom by being removed from a work furlough setting at the half-way house to one of total incarceration, stressing she was completely removed from an environment where she was a socially functional individual to a woman's jail where she remained until sentencing, including a period during which she underwent a psychological examination. Consequently, her challenge evolves into a two-fold attack on the propriety of the trial court's ruling, claiming she was denied equal protection under the law on the one hand, while asserting she was not "in custody" while in the half-way house, within the meaning of section 2900.5, subdivision (b).
Her assertion she was not "in custody" within the meaning of section 2900.5 is meritless. It runs contrary to the express language of subdivision (a) which affords credit against a sentence for time spent in a "work furlough facility" or a "half-way house." (See In re Wolfenbarger (1977) 76 Cal. App.3d 201, 205 [142 Cal. Rptr. 745].) Further, although section 2900.5 pertains to pretrial incarceration and the meaning of custody within that context seems apparent (see In re Rojas, supra, 23 Cal.3d 152, 156; In re Watson, supra, 19 Cal.3d 646, 651), even if we acknowledge that "in custody" constitutes an "elastic" term connoting a concept quite different from incarceration or imprisonment and including restraints not shared by the public generally (People v. Rodgers (1978) 79 Cal. App.3d 26, 31 [144 Cal. Rptr. 602]; People v. Mobley (1983) 139 Cal. App.3d 320, 323 [188 Cal. Rptr. 583]; In re Debra S. (1982) 135 Cal. App.3d 378, 385-386 [185 Cal. Rptr. 219]), we nevertheless conclude Mercurio was "in custody" within the meaning of the statute. Although she was in work furlough status, she was still an inmate in the custody of the Department of Corrections (see § 6263, subd. (c)) within a confinement context (see § 4504). This is so even though, upon being assigned to a work furlough status, she was granted certain privileges including working outside an institutional setting.
When inmates near completion of a term of imprisonment, they may be eligible to participate in a work furlough program (§§ 6260-6266) where they are removed from the institutional setting of incarceration and transferred to a community facility (§§ 6253, 6254). Daily, inmates may be granted permission to leave the facility temporarily to participate in a program of work or education, or to attend to medical needs. However, the inmate on work furlough remains in the custody of the Department of Corrections within the meaning of section 2900.5 at all times.
*1113 Here, when Mercurio was arrested for her second offense (petty theft), she was in custody and serving a prison term imposed on a prior unrelated offense. After committing a new crime while on work furlough, she was confined in a regular penal facility to complete the remainder of her term, thus stripping her of the freedom associated with work furlough and the half-way house. Accordingly, she was properly denied credits against her sentence on the new charge for time served before completing her previous term of imprisonment; for, such custody was not attributable to the confinement imposed for the new conviction.
Disposition:[2]
Judgment affirmed.
Staniforth, Acting P.J., and Lewis, J., concurred.
Appellant's petition for review by the Supreme Court was denied October 16, 1985.
NOTES
[1]  All statutory references are to the Penal Code.
[2]  In light of our holding and reasoning, we can find no potential denial of equal protection in the denial of presentence custody and conduct credits under the instant circumstances. Moreover, Mercurio's reliance on People v. Velasquez (1984) 156 Cal. App.3d 477, 480, footnote 2 [202 Cal. Rptr. 786], regarding a presumption for concurrent sentences, is misplaced. Indeed, when a prison inmate is convicted of committing a felony while confined, consecutive sentences are required. (§ 1170.1, subd. (c).) However, Mercurio here was not sentenced under that statute, because her previous term expired before sentencing on the petty theft. Finally, her assertion she was penalized for seeking a psychological examination is meritless; for, during the time period she was being examined, she obviously received both custody and conduct credits to be applied to her prior prison term and, if that term had expired, the remainder of such time would be credited in a presentence context to her term for the petty theft.
