
144 Cal.App.3d 290 (1983)
192 Cal. Rptr. 165
THE PEOPLE, Plaintiff and Respondent,
v.
REGINAL LEON LAWRENCE, Defendant and Appellant.
Docket No. AO16407.
Court of Appeals of California, First District, Division Three.
May 4, 1983.
*292 COUNSEL
Quin Denvir, State Public Defender, under appointment by the Court of Appeal, Michael S. McCormick and Kathleen Kahn, Deputy State Public Defenders, for Defendant and Appellant.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, William D. Stein, Assistant Attorney General, Ronald E. Niver and J. Patrick Collins, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
WHITE, P.J.
Defendant and appellant Reginal Leon Lawrence appeals from the judgment of the Superior Court of Solano County entered after appellant pleaded guilty to rape in violation of Penal Code section 261, subdivision (3) and admitted using a knife in the commission of the offense within the meaning of Penal Code section 12022, subdivision (b). The appeal is limited to the single issue of denial of conduct credits on the time appellant was held in custody in the California Youth Authority and juvenile hall. Appellant contends that he is entitled to conduct credits on his prison term for (1) time served in the Youth Authority for purposes of a diagnostic report and evaluation, (2) time served in the Youth Authority under commitment as a youthful offender, and (3) time served in juvenile hall pending commitment to the Youth Authority.
Appellant's time in presentence custody was served as follows:


                                               Dates               Total
       Name of Facility           From                   To        Days
Solano County Juvenile Hall       9-15-77                1-4-78      112
Youth Authority                   1-4-78                 2-28-78      55
Solano County Juvenile Hall       2-28-78                3-17-78      17
Solano County jail                3-17-78                5-9-78       53
*293 Youth Authority                   5-9-78                 5-5-80      727
Solano County jail                1-13-81                4-9-81       87
Youth Authority                   4-9-81                 1-21-82     287
Solano County jail                1-21-82                2-22-82      32
                                                                   _____
        Total Credits                                              1,370

The judge awarded Lawrence conduct credit of 86 days for the 172 days spent in county jail. Adding this conduct credit to the 1,370 days of custody credit, the judge granted appellant a total credit of 1,456 days. The judge did not grant Lawrence conduct credit for the two juvenile hall detention periods, the time spent in the Youth Authority for diagnostic evaluation, nor for the two remaining Youth Authority periods of custody.

1. Conduct Credit for Time Served in the Youth Authority for Purposes of a Diagnostic Report and Evaluation.

Appellant contends that he is entitled to 28 days' conduct credit for the 55 days he served in the Youth Authority for purposes of diagnosis. In support of his contention, appellant cites People v. Sage (1980) 26 Cal.3d 498 [165 Cal. Rptr. 280, 611 P.2d 874], which held that it was a violation of equal protection to deny conduct credits to persons who were held in custody prior to sentencing when the legislative scheme permitted persons who avoided presentence confinement to be eligible for conduct credit on their entire sentence. Appellant argues that it logically follows from the reasoning in Sage that appellant is entitled to conduct credit on his prison term for the time spent in the Youth Authority for diagnosis prior to commitment. He contends that no compelling state interest can justify the longer overall period of incarceration for persons who happen to be committed to a diagnostic facility before being committed to prison.
(1) There are two purposes for conduct credit in a prison setting: (1) to encourage prisoners to conform to prison regulations and to refrain from engaging in criminal, particularly assaultive, acts while in custody, and (2) to induce prisoners to make an effort to participate in rehabilitative activities. (People v. Saffell (1979) 25 Cal.3d 223, 233 [157 Cal. Rptr. 897, 599 P.2d 92].) Though these twin goals are appropriate and necessary in a prison setting, they are not suitable within a hospital context or with respect to the Youth Authority. In Saffell, the Supreme Court denied conduct credit for time spent in a facility for a mentally disordered sex offender (MDSO). In People v. Reynolds (1981) 116 Cal. App.3d 141 [171 Cal. Rptr. 461], this court applied the Saffell analysis to deny a request for conduct credit for time served at the Youth Authority. Both courts noted the following reasons for denying conduct credits: "First, the concept of giving or taking away *294 credits might interfere with therapy. Second, even without conduct credit, acceptable behavior in the hospital is encouraged by the possibility that the disruptive patient can be determined unamenable to treatment, and transferred to prison. Third, part of prison `good time' may be earned by participating in certain programs which may be unavailable in a hospital. Fourth, denial of `good time' credits involves an array of administrative requirements with which hospital personnel may be unable to comply; ... Finally, the concept of `good time' credit does not make sense in the context of an indefinite medical commitment period which can be extended if necessary." (People v. Reynolds, supra, at p. 145, citing People v. Saffell, supra, at p. 234.)
(2) For these reasons we deny conduct credit for diagnostic evaluation in the Youth Authority. First, giving or taking away credits might interfere with the diagnosis and evaluation. Second, acceptable behavior in the Youth Authority is encouraged by the possibility that the disruptive youth can be determined unsuitable for commitment to the Youth Authority. Third, certain "participation" programs may be unavailable in a diagnostic setting. Fourth, conduct credits may involve an array of administrative requirements that the Youth Authority is unable to fund or administer. Finally, the concept of "good time" does not make sense in the context of an indefinite diagnostic period which can be shortened or lengthened within 90 days if necessary. (Welf. & Inst. Code, § 707.2.)
The decision in People v. Sage does not require a contrary result. In Sage, two equal protection arguments were addressed: (1) whether the defendant was entitled to conduct credit for time spent in a state hospital for treatment as a mentally disordered sex offender (MDSO) and (2) whether defendant was entitled to conduct credit for presentence jail time. The court refused to allow conduct credit for the time spent in treatment as an MDSO. "[D]efendant's equal protection claim is foreclosed by our recent decision in People v. Saffell (1979) 25 Cal.3d 223, 233-235 ..., in which, applying the compelling state interest test, we held that an MDSO is not denied equal protection of the laws because he cannot earn the conduct credit available to inmates of correctional facilities." (People v. Sage, supra, 26 Cal.3d 498, 506-507.) The court did, however, find a violation of equal protection where the legislative scheme denied presentence conduct credit to felons detained in jail prior to trial while allowing a defendant who makes bail or is released on his own recognizance, then is tried, convicted of a felony and sentenced to state prison to receive conduct credit on his full sentence.
The Sage decision on the first equal protection issue (denying conduct credit for time spent in a state hospital) goes directly against appellant. Appellant, like the defendant in Sage, seeks conduct credit for time spent *295 in a nonpenal institution. Thus, the court's decision in Sage denying conduct credit is controlling.
The Sage decision on the second issue (requiring conduct credit for presentence jail time) does not apply to appellant. Appellant was given conduct credit for the time he spent in the county jail prior to sentencing. Thus, appellant's argument that he is entitled to conduct credit for time spent in the Youth Authority for diagnosis is unsubstantiated.

2. Conduct Credit for Time Served in the Youth Authority Under Commitment as a Youthful Offender.

Appellant contends that he is entitled to 507 days' conduct credit for the 1,014 days he spent in the Youth Authority. He argues that the denial of these conduct credits will result in a violation of equal protection. Under Welfare and Institutions Code section 1731.5, subdivision (c), a youthful offender may be transferred to the Youth Authority from prison and receive conduct credit against his prison sentence. Appellant argues that the fact that an individual was committed to the Youth Authority by a court order rather than transferred there by the Director of Corrections affords no rational basis for denying conduct credit on a prison term for time spent in the Youth Authority. We disagree.
In People v. Reynolds, supra, 116 Cal. App.3d 141, 146, this court (Scott, J.) noted the distinction between a prison sentence and Youth Authority commitment. "[T]he purpose of a Youth Authority commitment is treatment and rehabilitation; ..." In contrast, "[t]he purpose of imprisonment, once `deterrence, isolation and rehabilitation,' has now been declared to be punishment; ..." (Ibid.) With the enactment of the Determinate Sentencing Act, the distinction between a prison sentence and a Youth Authority commitment has been significantly sharpened. (Ibid.) A determinate prison term is for the purpose of punishing the youthful offender for a specific period of time. In contrast, a youthful offender committed to the Youth Authority has an indeterminate sentence in conformance with the rehabilitative nature of the commitment. Thus, where conduct credits are appropriate in a prison setting to encourage good behavior, they are not consistent with the indeterminate, rehabilitative nature of a Youth Authority commitment. (In re Ricky H. (1981) 30 Cal.3d 176 [178 Cal. Rptr. 324, 636 P.2d 13].)
Section 1731.5, subdivision (c) of the Welfare and Institutions Code states that the transfer of a youthful offender from prison to the Youth Authority "shall be solely for the purposes of housing the inmate and allowing participation in the programs available at the institution by the inmate, who, in *296 all other aspects shall be deemed to be committed to the Department of Corrections and shall remain subject to the jurisdiction of the Director of Corrections and the Board of Prison Terms." (3) Thus, a youthful offender transferred to the Youth Authority must continue to serve a determinate prison sentence, while a person committed directly to the Youth Authority has an indeterminate sentence and the possibility of being released early. Because the purpose of a prison sentence and the purpose of a Youth Authority commitment differ, youthful offenders sentenced to prison and transferred to the Youth Authority, and youthful offenders committed directly to the Youth Authority are differently situated classes. There is, therefore, no violation of equal protection in granting conduct credit to persons in the first group while denying credits to those in the second group.

3. Conduct Credit for Time Served in Juvenile Hall Pending Commitment to the Youth Authority.

(4) Appellant claims that he is entitled to 65 days of conduct credit for the 129 days he served in juvenile hall pending commitment to the Youth Authority. Respondent agrees that appellant is entitled to earn conduct credit for the time he served in juvenile hall, but contends that the case should be remanded for determination of the proper amount of such credit based on how well or poorly appellant behaved in juvenile hall.
In People v. Twine (1982) 135 Cal. App.3d 59 [185 Cal. Rptr. 85], the court held that a defendant sentenced to state prison is entitled to conduct credits for a period of presentence detention in a juvenile detention facility. However, the court noted that "[a] minor committed to the Youth Authority from juvenile court is not entitled to conduct credits for presentence custody in juvenile hall because conduct credits are inconsistent with the essentially indeterminate nature of a Youth Authority commitment." (Id., at p. 63, fn. 3; see also In re Ricky H., supra, 30 Cal.3d 176.) Therefore, because appellant was originally sentenced to the Youth Authority, he is not entitled to conduct credit for his presentence detention in juvenile hall.
The judgment is affirmed.
Scott, J., concurred.
FEINBERG, J., Concurring.
I had dissented in People v. Reynolds (1981) 116 Cal. App.3d 141, 148 [171 Cal. Rptr. 461], expressing my view *297 very briefly therein. While I have not changed my view, I concur in the judgment under the compulsion of Reynolds.
A petition for a rehearing was denied June 1, 1983, and appellant's petition for a hearing by the Supreme Court was denied July 27, 1983.
