
15 Cal.App.4th 1159 (1993)
19 Cal. Rptr.2d 390
THE PEOPLE, Plaintiff and Respondent,
v.
JOHN CLARENCE LAPAILLE, Defendant and Appellant.
Docket No. E011153.
Court of Appeals of California, Fourth District, Division Two.
May 10, 1993.
*1161 COUNSEL
Steven A. Schutte, under appointment by the Court of Appeal, for Defendant and Appellant.
Daniel E. Lungren, Attorney General, George Williamson, Chief Assistant Attorney General, Gary W. Schons, Assistant Attorney General, Holly D. Wilkens and Rhonda L. Cartwright Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
McKINSTER, J. 

FACTUAL AND PROCEDURAL HISTORY
The issues in this case are (1) whether defendant, who spent most of the time before sentencing on house arrest as a condition of release on his own *1162 recognizance, is entitled to presentence custody credit pursuant to Penal Code section 2900.5, as amended in 1991; (2) if not, whether denying him such credits, while allowing them to persons in electronic home detention programs, is a denial of equal protection; and (3) if entitled to custody credit, whether he is also entitled to good time/work time (conduct) credits under section 4019.[1]
Undercover police officers arrested defendant and his wife after the couple had bought 20 pounds of ephedrine from the officers in a controlled buy.[2] Defendant had told a police informant that he wanted the ephedrine for the purpose of manufacturing methamphetamine. He told the undercover officers that he was going to "cook" a batch of methamphetamine. After the couple's arrest, defendant maintained that he had become involved in a scheme to manufacture methamphetamine in order to obtain the drug for his own use. He explained that he had been addicted to methamphetamine since 1958, and that he had recently suffered a heart attack as a result of this addiction, rendering 40 percent of his heart muscle dead. He was on complete disability as a result of the condition of his heart.
Police searched defendant and his wife after their arrest, and also searched their home. They found four bags of methamphetamine weighing a total of 15.59 grams, an Ohaus scale, several weapons, and nearly $8,500 in cash. Defendant was charged with six different offenses, and eventually pled guilty to one count each of sale or transport of methamphetamine and being a felon in possession of a gun. According to a plea bargain, the trial court sentenced him to a total of three years and eight months in prison.
Apparently the municipal court released defendant on his own recognizance shortly after his arrest, on the condition that he not leave his place of residence except to visit his lawyer and make court appearances (he served only three days in jail pending sentencing). At the preliminary hearing, after defendant had been bound over to the superior court, the magistrate ordered that he "remain on home detention." The minute order entered after the hearing reflects that defendant was "released O.R. and informed of the provisions of P.C. 1320 [the section explaining the consequences of willful failure to appear after being placed on own recognizance]," with a handwritten notation below stating "home detention."
Defendant remained at his residence until his sentencing, a total of 371 days. The minute order entered after defendant's arraignment in superior *1163 court states that defendant was "released to house arrest," while the reporter's transcript of the arraignment reflects that defendant's counsel explained to the superior court that defendant was "on a form of house detention due to a medical problem." A minute order continuing defendant's trial readiness conference reflected that his status remained the same. At another interim hearing, defendant's counsel requested that defendant's "home detention" be modified so that he could walk his daughter to and from the school bus. The trial court modified his "home detention" to "allow him to leave the home for 30 or so minutes in the morning and afternoon to pick up his daughter from the bus stop."
At the hearing in which defendant changed his plea to guilty, his attorney reported to the court: "He [defendant] is on home detention. It is my understanding that he has responded to each and every call that they have made from the Home Detention Unit. And if it would have been the case otherwise the Court would have heard from the release clerk." Finally, after entering his plea defendant requested that he be released from "home detention" to assist his wife in moving and in placing their belongings in storage. The trial court stated that it would remove defendant from "home detention" and place him on "straight O.R.," if he and his wife would waive their Fourth Amendment rights so that the authorities could come in and search the house at any time during his release on his own recognizance (O.R.). Defendant and his wife agreed to this provision, and the trial court explained the search term to them.
At his sentencing hearing, defendant's counsel requested that the trial court award custody credits to defendant for the 371 days which he had spent confined to his residence. The court refused this request. Defendant's appeal is based solely on this refusal to award credits.

DISCUSSION

I.

Application of Section 2900.5 to "Home Detention" as a Condition of O.R.
(1) Defendant contends that section 2900.5, as amended in 1991, requires that he receive presentence custody and good time/work time credits on his sentence for the time he spent in "home detention" as a condition of release on O.R.[3] He argues that the added words, "home detention program," were meant by the Legislature to include the house arrest condition of O.R. *1164 under which he was confined to his home, and that the Legislature's purpose in amending the statute was to supersede the holding in People v. Reinertson (1986) 178 Cal. App.3d 320 [223 Cal. Rptr. 670]. Reinertson had held that home detention as a condition of probation was not sufficiently "custodial" to warrant award of credits against a prison sentence which had been suspended until the defendant's probation was revoked. (Id., at pp. 323, 327.) Respondent argues that the words "home detention program" in the amended statute refer only to statutorily authorized electronic home detention programs established under section 1203.016, not to home detention as a condition of O.R.
In order to understand and apply section 2900.5, subdivision (a), it is necessary to examine the text of Assembly Bill No. 688 and its legislative history. Section 2900.5, subdivision (a) was originally enacted in 1971. At first it covered only presentence custody in county jail, but it has been amended several times to cover other custodial settings. (Historical Note, 51B West's Ann. Pen. Code (1982) § 2900.5, p. 183.) The subdivision was added to the Penal Code to eliminate the unequal treatment of indigent defendants who would otherwise spend a longer time confined for their crimes than those who could afford to post bail pending disposition of their cases, and also of those who were unable to obtain bail for other reasons. People v. Riolo (1983) 33 Cal.3d 223, 228 [188 Cal. Rptr. 371, 655 P.2d 723].) It reflected "the basic philosophy that when a person is incarcerated he is being punished by the reality of incarceration." (Ibid.)
Section 2900.5, subdivision (a) was amended in 1991 pursuant to Assembly Bill No. 688. (Stats. 1991, ch. 437.) The purposes of Assembly Bill No. 668, according to the Legislative Counsel's Digest, were to (1) provide for a uniform, efficient way for county boards of supervisors to set rates of and collect administrative fees from county prisoners participating in work furlough, home detention, and parole programs; and (2) award prisoners in custody in a home detention program credit against their sentences for such custody, just as prisoners in institutional custodial programs already received such credit.
*1165 That in referring to "home detention programs" in Assembly Bill No. 688, the Legislature meant only electronic home detention programs established under section 1203.016, in which the prisoner is permitted to be at his or her home but must wear an electronic tracking device at all times, and submit to other statutory restrictions, is clear from the text of the bill and other legislative materials, as we explain below.
Assembly Bill No. 688 added several sections to the Penal Code establishing specific guidelines which program administrators of statutory work furlough, electronic home detention, and parole supervision programs must follow in levying and collecting supervision fees: Section 1203.1e covers parole supervision fees; section 1203.1f permits consolidation of probation and parole supervision fee hearings; section 1208.2 governs fees for work furlough programs established pursuant to section 1208 and "electronic home detention program[s]" set up under section 1203.016[4]; and section 1208.3 requires an administrator of such a work furlough program to verify that a participant is receiving legal wages and is covered by workers' compensation, and to take other steps to ensure the prisoner is not being exploited. (Stats. 1991, ch. 437.)
In addition to the sections which Assembly Bill No. 688 added to the Penal Code, the bill amended section 1208.5 to allow prisoners serving in electronic home detention programs established under section 1203.016 to transfer from one county's program to that of another county. (Stats. 1991, ch. 437.) In amended section 1208.5, section 1203.016 electronic home detention programs are referred simply as "home detention" programs.[5] (Ibid.) The Legislature provided that the amendment to section 1208.5, as well as all the above-described additions to the Penal Code, would remain operative only until 1995. (Stats. 1991, ch. 437.)
The final provisions of Assembly Bill No. 688 amended section 2900.5, subdivision (a) to include "home detention programs" among those programs for which a prisoner would receive presentence credit, as described above; and added section 2900.5, subdivision (f), to provide for the first time that convicted prisoners enrolled in alternative sentencing programs, including "home detention programs," would get credit against sentences for offenses *1166 which required that offenders serve a mandatory minimum period of time in jail.[6] (Stats. 1991, ch. 437.) The Legislature again provided that this amendment and addition to the Penal Code would remain operative until 1995, after which subdivision (a) would be amended to delete "home detention program," and subdivision (f) would be entirely deleted. (Ibid.)
The legislative history of Assembly Bill No. 688 reveals that the source for the bill was the County of Contra Costa, and that the bill was supported by the California Probation, Parole and Correctional Association. (See Assem. Com. on Public Safety Rep. on [Assembly Bill No.] 688 (Apr. 9, 1991) p. 2 (1991-1992 Reg. Sess.). According to the bill's sponsor, as reported in April of 1991, Assembly Bill No. 688 "simply [sought] to establish uniform language among the several sections of [the] Penal Code governing the collection of fees for three programs (parole supervision, electronic home detention, and work furlough programs).... The utilization of common language [would] enable the sheriff to streamline collection procedures." (Assem. Com. on Public Safety Rep., supra, p. 2.)
According to the same report, the bill would do three things: (1) allow "the administrator to charge the prisoner a fee, set by the board of supervisors, to participate in the work furlough program, electronic home detention program, or county parole program"; (2) enable "the board of supervisors of two or more counties having home detention programs to enter into agreements to transfer parolees in order for [those] parolee[s] to continue [their] regular employment or education"; and (3) specify "that if a court orders a defendant to serve time in an alternative sentencing program, as specified, in lieu of imprisonment in the county jail, the time spent in these facilities [would] qualify as mandatory time in jail." (Assem. Com. on Public Safety Rep., supra, at pp. 1-2.) The report made no reference to inclusion of home detention programs among those for which participants would receive presentence credit.
After passage in the assembly, the bill was apparently amended in the Senate to include the amendment adding "home detention program" to section 2900.5, subdivision (a). (See Sen. Com. on Judiciary Rep. on [Assem. Bill No.] 688 (July 2, 1991) p. 1 (1991-1992 Reg. Sess.).) The legislative history which we have been able to obtain includes no explanation for this change, nor does it define the meaning of the added phrase. The Senate Judiciary Committee then considered the bill. (Id., at pp. 1-5.) In a *1167 report prepared for committee hearing on the bill, the purpose of the bill and what it would accomplish were set out at length. (Id., at pp. 2-4.) The report described the changes to the statutes concerning levying and collecting fees for administration of statutory electronic home detention programs established under section 1203.016 at length, but at no time did the report utilize the phrase "electronic home detention programs" as had the assembly report; instead the report referred to these programs throughout as merely "home detention programs."
This report refers for the first time in the legislative history to the proposed amendment to section 2900.5, subdivision (a), stating: "Under existing law, in all felony and misdemeanor convictions, either by plea or by verdict when the defendant has been in custody in certain programs such as a work furlough facility or halfway house, all days of custody of the defendant shall be credited upon his or her term of imprisonment.... [¶] This bill would expressly include the custody of the defendant in a home detention program in this provision." (See Sen. Com. on Judiciary Rep., supra, at p. 3.)
Finally, the Senate Judiciary Committee report took up the related issue of whether the electronic home detention program statute, section 1203.016, should have its sunset clause extended. (Sen. Com. on Judiciary Rep., supra, at pp. 4-5.) At the time the report was written, section 1203.016 provided that it would be repealed in 1993, but the committee was concerned that no evaluation of the programs had yet been made, though the sunset clause was to take effect in just over one year. (Sen. Com. on Judiciary Rep., supra, at pp. 4-5.) However, the report recommended that the best approach was to wait until the sunset date to amend the clause, so that the committee could be provided with data on the costs, successes, and problems of the programs.[7] (Ibid.) Nowhere in this part of the report were these programs referred to as "electronic home detention programs"; as in other parts of the report, they were simply called "home detention program[s]."
Neither the text of Assembly Bill No. 688 nor the legislative history of the bill suggests in any way that the Legislature intended that the 1991 amendment and addition to section 2900.5 would authorize preconviction or presentence credit for offenders who had spent time in house arrest pursuant to O.R. The only reasonable conclusion which can be drawn from these materials is that throughout the bill legislators were referring only to electronic home detention programs authorized by section 1203.016. Moreover, we have been unable to find any reference to People v. Reinertson, supra, 178 Cal. App.3d 320, in the materials, and we note that the appellate court *1168 decided Reinertson in 1986, some two years before the Legislature enacted section 1203.016, the Mojonnier-Ayala Electronic Home Detention Act. (Historical Note, 51 West's Ann. Cal. Codes (1993 pocket supp.) § 1203.016, p. 42.) Thus, Reinertson could not have referred to electronic home detention pursuant to section 1203.016, and cannot apply to such programs in light of the 1991 amendments to section 2900.5.

II.

Equal Protection Under Section 2900.5
Our consideration of defendant's appeal by no means ends with our conclusion that the Legislature did not intend for the 1991 amendment to section 2900.5, subdivision (a) to apply to house arrest pursuant to O.R. (2a) We must also explore defendant's contention that failure to award him custody credits for his preconviction house arrest under that subdivision, while awarding them to those confined in a postsentence electronic home detention program prior to his imprisonment sentence violated his right to equal protection of the laws under the United States and California Constitutions.
(3) The basic guarantee of equal protection embodied in the United States and California Constitutions provides that the state cannot arbitrarily discriminate among persons who are subject to its jurisdiction by requiring that "classifications between those to whom the state accords and withholds substantial benefits must be reasonably related to a legitimate public purpose." (In re Kapperman (1974) 11 Cal.3d 542, 545 [114 Cal. Rptr. 97, 522 P.2d 657].) When the equal protection issue involves fundamental interests, such as liberty, our courts have required that the state establish that it has a compelling interest in making such classifications. (In re Jiminez (1985) 166 Cal. App.3d 686, 691 [212 Cal. Rptr. 550].) (4) These provisions have been applied to require that section 2900.5 credit be applied uniformly to all those convicted of felony offenses who are imprisoned for their offenses. (Kapperman, at pp. 546, 550 [retroactivity of § 2900.5]; People v. Darnell (1990) 224 Cal. App.3d 806, 809 [274 Cal. Rptr. 110] [§ 2900.5 credit extended to person released on O.R. on condition he remain in alcohol rehabilitation facility pending sentencing]; People v. Mobley (1983) 139 Cal. App.3d 320, 322-323 [188 Cal. Rptr. 583]; and People v. Sylvestry (1980) 112 Cal. App.3d Supp. 1, 3 [169 Cal. Rptr. 575] [§ 2900.5 credit to person released on O.R. to drug treatment facility].)
In each of the above cases concerning equal protection for persons released on O.R. to a custodial setting, the courts have explained that in *1169 determining who is entitled to section 2900.5 credit, it is not the procedures under which defendants are placed in such custodial settings that determine their right to credit, but the requirement that the placements be "custodial" and related to the same offenses for which defendant was convicted. (People v. Darnell, supra, 224 Cal. App.3d at p. 809; People v. Mobley, supra, 139 Cal. App.3d at p. 323; People v. Sylvestry, supra, 112 Cal. App.3d at p. Supp. 6.) "Custodial" has been defined for purposes of these analyses as involving "restraints not shared by the general public." (Mobley, supra, at p. 323.) (2b) Thus, in order to compare persons confined to their homes under electronic surveillance, and thus eligible for home detention program credit pursuant to current section 2900.5, subdivision (a), with defendant, who was confined to preconviction house arrest as a condition of O.R., for purposes of applying the equal protection clauses, we must determine whether his confinement to his home was as custodial, or restraining, as are those confined subject to electronic tracking.
Respondent argues that defendant's confinement was far different from that suffered by persons similarly confined in electronic home detention programs, more akin to that of a teenager's being "grounded" for disciplinary purposes. We disagree. Section 1203.016 provides that defendants on electronic home detention must remain in the interior of their homes during hours designated by the program administrator, admit the administrator to their homes at any hour to verify compliance with the program, wear an electronic monitoring device, be subject to arrest without warrant if there is reasonable cause to believe they have violated program rules, and abide by other rules and regulations imposed by county authorities. However, such defendants may also be permitted to seek and retain employment outside the home, attend psychological counseling sessions and educational or vocational classes, and go to medical and dental appointments.
Based on the limited record before us, we conclude that defendant in this case was subject to restraints at least as confining as those placed on persons in electronic home detention programs, so that his house arrest was just as "custodial." The trial court ordered defendant to remain at his home, except for visits to his lawyer and court appearances. At some time during his lengthy home confinement, the court gave him permission to leave his home to walk his daughter to and from the school bus. The probation department or release clerk called him to verify that he was complying with his confinement. There is no indication that defendant ever left his home to attend medical or dental appointments, or to participate in any counseling sessions. He was on complete disability due to his heart condition, and thus did not work.
Based on the above comparison, we hold that defendant in this case is entitled to custody credits for preconviction custody pursuant to section *1170 2900.5, subdivision (a), as amended in 1991, under the state and federal equal protection clauses. The only real differences between this defendant's confinement and that of one on electronic home confinement is that one is based at home under O.R. release, and the other on a statutory program; and that one's location is verified by electronic tracking, while the other's is based on telephone calls to the residence. These procedural differences are not legitimate bases for treating defendant differently from those placed in electronic home detention programs pursuant to section 1203.016. (E.g., People v. Darnell, supra, 224 Cal. App.3d at p. 809.)[8]

III.

Equal Protection Under Section 4019
(5) Defendant also contends that he is entitled to conduct credits for his preconviction confinement pursuant to house arrest. As we explain below, this does not necessarily follow from the above equal protection analysis.
Though the Legislature amended section 2900.5, subdivision (a) to include custody credits for home detention, it did not likewise amend section 4019 to include conduct credits. Thus, no person on home detention, whether electronic or otherwise, is statutorily entitled to such credit. Section 4019 itself provides that conduct credits be awarded to those who are in custody in a county or city jail, industrial farm, or road camp pending sentencing. Section 1208, subdivision (f) requires that persons in custody in work furlough programs also be eligible for such credits.
Our appellate courts have denied conduct credits in a number of cases in which persons confined in other "custodial" facilities not enumerated in sections 4019 and 1208, subdivision (a) have contended that they were entitled to conduct credits for presentence confinement. (E.g., People v. Darnell, supra, 224 Cal. App.3d at p. 811 [confinement in alcohol rehabilitation program as condition of O.R. release]; People v. Ambrose (1992) 7 Cal. App.4th 1917, 1924-1925 [9 Cal. Rptr.2d 812] [confinement in residential alcoholic treatment center]; People v. Palazuelos (1986) 180 Cal. App.3d 962, 965-966 [226 Cal. Rptr. 31] & People v. Broad (1985) 165 Cal. App.3d 882, 884 [211 Cal. Rptr. 679] [confinement in residential drug treatment facility]; People v. Waterman (1986) 42 Cal.3d 565, 571, fn. 4 [229 Cal. Rptr. 796, 724 P.2d 482] [confinement in state mental hospital for treatment of *1171 incompetency to stand trial]; People v. Saffell (1979) 25 Cal.3d 223, 233-235 [157 Cal. Rptr. 897, 599 P.2d 92].) In Saffell, our Supreme Court explained that the purposes of conduct credits are to encourage prisoners to conform to prison regulations, refrain from criminal activity, especially assaultive behavior, and make an effort to participate in "rehabilitative" activities while incarcerated. (Saffell, supra, at p. 233.) The court held that these goals were appropriate to the prison setting, but not to hospital treatment modalities, and thus refused to award such credits to person committed to state mental hospitals as mentally disordered sex offenders. (Id., at p. 235.)
In contrast to the above cases, we have found three appellate decisions which have resulted in award of presentence conduct credits to persons not authorized to receive conduct credits under sections 4019 and 1208, subdivision (f). (People v. Mobley, supra, 139 Cal. App.3d at p. 323 [confinement in substance abuse treatment facility as condition of O.R.]; In re Martin (1981) 125 Cal. App.3d 896, 902-903 [178 Cal. Rptr. 445] [presentence civil commitment to California Rehabilitation Center (CRC)]; People v. Sylvestry, supra, 112 Cal. App.3d Supp. 1.)
People v. Sylvestry, supra, 112 Cal. App.3d Supp. 1, an opinion of the appellate department of the superior court, provides no guidance in this case. In an appeal by the prosecutor, the Sylvestry court affirmed an award of both section 2900.5 custody credits and section 4019 conduct credits to a defendant confined in a drug treatment program pending sentencing. (112 Cal. App.3d at pp. Supp. 5-9.) The issue of whether or not to award section 4019 credits to a defendant confined to a drug treatment program was not discussed in the opinion, nor does it appear to have been raised.
As noted above, our intermediate appellate courts have disagreed with Sylvestry, and have refused to award conduct credits to those confined in drug treatment facilities pending sentencing. (People v. Palazuelos, supra, 180 Cal. App.3d at pp. 965-966; People v. Broad, supra, 165 Cal. App.3d at p. 884.) In Palazuelos, the appellate court pointed out that persons who had been confined in drug treatment facilities as a condition of probation and were later sentenced to prison after revocation of probation were not covered by the provisions of section 4019. (Palazuelos, supra, at p. 964.) It then rejected an equal protection argument which relied on Sylvestry. (Id., at pp. 965-966.) The Palazuelos court disagreed with Sylvestry to the extent it awarded conduct credit. (Ibid.) It concluded that Sylvestry's confinement for drug rehabilitation had occurred in an institution to which section 4019 conduct credits did not apply. (180 Cal. App.3d at pp. 965-966.)
In re Martin, supra, 125 Cal. App.3d at pages 902-903, also has no relation to this case. It involved a dissimilarity between those confined to CRC who *1172 stayed with the program and those who did not and then were committed to prison. (Id., at pp. 898-899.) The appellate court concluded that both groups were entitled to conduct credits pursuant to the provisions of Welfare and Institutions Code section 3201, subdivision (c), which established the equivalent of good time/work time credits for time spent at CRC. (125 Cal. App.3d at p. 902.)
Only the case of People v. Mobley, supra, 139 Cal. App.3d 320, departs to some extent from the cases which have been cited. In Mobley an appellate court decided that a defendant who had been confined in a drug rehabilitation facility pending commitment to CRC was entitled to conduct credits on his CRC commitment. (Id., at p. 323.) The court pointed out that In re Martin, supra, 125 Cal. App.3d at page 902, had held that defendants placed at CRC were entitled to conduct credits for their time at CRC. It reasoned that because those placed at CRC were receiving conduct credit for time spent in treatment and rehabilitation, they should also get credit for time spent in treatment and rehabilitation at a drug rehabilitation facility pending placement at CRC. (Id., at. p. 323.) The court also mentioned that if the defendant were not awarded conduct credits, he would ultimately spend more time in custody than had he been able to post bail, under an equal protection analysis. (Id., at p. 324.)
Neither Mobley, nor Martin, nor Sylvestry governs in the case before us. In not receiving conduct credits for time spent on preconviction home arrest defendant will not be treated differently from those confined in electronic home detention programs. The latter group is not entitled to conduct credit; nor will he be treated differently from those placed in other than penally restrictive programs as a condition to an O.R. release, such as a drug or alcohol treatment facility. Rather, he will be treated differently from those held in city or county jails, road camps, industrial camps, or work furlough facilities.
In our opinion, those on home arrest pursuant to an O.R. release are not similarly situated to those placed in more penally restrictive settings. As our Supreme Court pointed out in People v. Saffell, supra, 25 Cal.3d at page 233, those in such situations are subject to strict, regimented conduct regulations; need special incentives not to disobey prison rules or commit other crimes while incarcerated, especially assault crimes on other inmates; and are expected to engage in "rehabilitative" activities. Defendant and others in his situation are not subject to strict regulation within their homes, but may dress and behave as they like, have constant visitors, indulge in family life and recreation; nor are they expected to participate in rehabilitative programs, or in defendant's case to work. They do not have to adhere to a strict *1173 code of penal institution conduct any more than do those on other types of nonpenal custodial O.R. release. Thus, the equal protection clauses of the state and federal Constitutions do not require that they receive conduct credits as incentives to behave properly. We hold that defendant is not entitled to section 4019 good time/work time credits for the time he spent on house arrest as a condition of release on O.R.

DISPOSITION
The judgment is reversed as to the award of custody credits pursuant to section 2900.5, subdivision (a), and the case is remanded so that the trial court can determine the number of days of additional preconviction custody credit which are due defendant, correct the abstract of judgment to reflect the award of these credits, and notify the Department of Corrections of the additional custody credits. In all other respects, the judgment is affirmed.
Dabney, Acting P.J., and Timlin, J., concurred.
The petitions of both respondent and appellant for review by the Supreme Court was denied August 13, 1993.
NOTES
[1]  All further statutory references are to the Penal Code, unless otherwise indicated.
[2]  Because defendant pled guilty pursuant to a plea bargain, some of the facts are taken from the probation report.
[3]  Section 2900.5, subdivision (a), as amended in 1991, provides in pertinent part: "In all felony and misdemeanor convictions, either by plea or by verdict, when the defendant has been in custody, including, but not limited to, any time spent in a jail, camp, work furlough facility, halfway house, rehabilitation facility, hospital, prison, juvenile detention facility, similar residential institution, or home detention program, all days of custody of the defendant, including days served as a condition of probation in compliance with a court order, and including days credited to the period of confinement pursuant to Section 4019, shall be credited upon his or her term of imprisonment, or credited to any fine which may be imposed, at the rate of not less than thirty dollars ($30) per day, or more, in the discretion of the court imposing the sentence."

The additions made in 1991 are underscored in the above text of the statute.
[4]  Though the text of the bill initially referred to "electronic home detention" programs established pursuant to section 1208.1, rather than section 1203.016, this was apparently an error on the part of the drafters of the bill which was not caught until after enactment of the statute. There is no section 1208.1 in the Penal Code, and sections 1208.2 and 1208.5 have since been amended to replace "section 1208.1" with "section 1203.016."
[5]  See footnote 4.
[6]  Section 2900.5, subdivision (f), added to the Penal Code in 1991, provided: "If a defendant serves time in a camp, work furlough facility, halfway house, rehabilitational facility, hospital, juvenile detention facility, similar residential facility, or home detention program in lieu of imprisonment in 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."
[7]  The Legislature amended section 1203.016 to delete its sunset clause altogether in 1992. (Stats. 1992, ch. 5, § 1.)
[8]  We do not, however, extend our holding to require that all those placed on house arrest as a condition of O.R. pending sentencing receive presentence custody credits pursuant to section 2900.5. We can conceive of instances in which the "house arrest" may be so little confining and dissimilar to the requirements of an electronic home detention program that it is not similarly custodial or restraining to entitle a defendant to such credits.
