
154 Cal.App.3d 111 (1984)
201 Cal. Rptr. 60
THE PEOPLE, Plaintiff and Respondent,
v.
ARTHUR SALDIVAR, Defendant and Appellant.
Docket No. F001837.
Court of Appeals of California, Fifth District.
April 3, 1984.
*113 COUNSEL
Quin Denvir, State Public Defender, under appointment by the Court of Appeal, Eric J. Coffill and Harvey Zall, Deputy State Public Defenders, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Arnold O. Overoye, Assistant Attorney General, Willard J. Jones and William G. Prahl, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
FRANSON, Acting P.J. 

STATEMENT OF THE CASE
On April 30, 1982, following denial of a Penal Code section 1538.5 motion to suppress evidence, appellant pleaded guilty to a charge of robbery. On June 17, 1982, the court "suspend[ed] imposition of judgment and sentence" and placed appellant on five years probation. Less than a month later, appellant's probation was revoked for failure to comply with the terms of probation.
Appellant was sent to the California Youth Authority (CYA or Youth Authority) for a diagnostic evaluation. While at CYA, appellant threatened various case workers and was found with a metal weapon-type object in his possession; he was later found unamenable for treatment at the CYA.
On November 2, 1982, appellant was sentenced to five years in prison. He was awarded 280 days' credit for actual time spent in local custody plus partial good-time credit of 30 days. The trial court awarded appellant only 30 days of conduct credits because of his misbehavior at CYA.
On November 4, 1982, appellant filed a notice of appeal specifying two points to be raised on appeal: (1) the denial of his motion to suppress evidence under Penal Code section 1538.5; and (2) sentencing error.
At oral argument, appellant's counsel withdrew the first contention because it had not been timely preserved for appellate review, and because it was without merit. Accordingly, we will discuss only the sentencing error contention.


*114 DISCUSSION
Appellant contends the trial court erred in awarding him only 30 days good-time credits and no work-time credits because of his misbehavior during his diagnostic evaluation at CYA. We agree with the contention in part and remand the judgment for redetermination of the conduct credits.
(1a) The threshold question is whether appellant is entitled to good-time/work-time credits (hereinafter referred to collectively as conduct credits) for the time he spent at CYA for diagnostic evaluation prior to his being sentenced to prison. We conclude as a general principle that appellant is entitled to such credit.
People v. Duran (1983) 147 Cal. App.3d 1186 [195 Cal. Rptr. 724], holds that "[r]emanded juveniles found unamenable for YA treatment and then sentenced to prison should ... receive custody credits against their prison sentences for diagnostic time spent at YA." (Id., at p. 1191.) The court reasoned that it was a denial of equal protection for juveniles in defendant's position to be denied such credits when adults who spend time in diagnostic facilities prior to being sentenced to prison are allowed such credits. In reaching its conclusion, the Duran court held that juveniles and adults convicted in the criminal courts and sentenced to prison are similarly situated just as juveniles remanded to the CYA before sentencing and adults confined in Department of Corrections (DOC) diagnostic facilities (Pen. Code, § 1203.03, subd. (a)) are similarly situated. Because an adult confined in a DOC diagnostic facility before sentencing is entitled to conduct credits against his prison sentence for time spent at the facility, a juvenile remanded to the CYA for an amenability evaluation and then sentenced to prison is also entitled on equal protection grounds to conduct credits against his prison time for the diagnostic time spent at CYA.
The reasoning of the Duran court appears sound and accords with the equal protection principles requiring that juveniles be given custody credits against their prison sentences for time spent at juvenile hall. (People v. Twine (1982) 135 Cal. App.3d 59, 62-63 [185 Cal. Rptr. 85], relying on Pen. Code, § 4019 as interpreted in People v. Sage (1980) 26 Cal.3d 498, 507-508 [165 Cal. Rptr. 280, 611 P.2d 874].) Remanded juveniles found unamenable for CYA treatment and then sentenced to prison should likewise receive custody credits against their prison sentences for diagnostic time spent at CYA. (People v. Duran, supra, 147 Cal. App.3d at p. 1191.)
We decline to follow the reasoning in People v. Lawrence (1983) 144 Cal. App.3d 290 [192 Cal. Rptr. 165], which holds that unlike a prison, CYA is a nonpenal facility and time spent there is a rehabilatative alternative to *115 punishment in prison. The Lawrence court's reliance on People v. Sage, supra, 26 Cal.3d 498, 506-507 and People v. Saffell (1979) 25 Cal.3d 223, 233-235 [157 Cal. Rptr. 897, 599 P.2d 92] for the proposition that treatment and rehabilitation concepts are incompatible with the award of conduct credits has been eroded by legislative changes awarding conduct credits to mentally disordered sex offenders for time spent at state hospitals (Pen. Code, § 1364) and to narcotics addicts for time spent at the California Rehabilitation Center (Welf. & Inst. Code, § 3201, subd. (c)).
We recognize that in People v. Austin (1981) 30 Cal.3d 155 [178 Cal. Rptr. 312, 636 P.2d 1], the Supreme Court ruled that a young adult (under 21 years of age at the time of apprehension) was not entitled to conduct credits for the period of his confinement at the Youth Authority. Denial of such credit did not offend equal protection principles in view of the indeterminate nature of the Youth Authority commitment and the discretionary power vested in the parole board to consider a defendant's behavior plus the rehabilitative nature of confinement at CYA. (2) For similar reasons, a person sent to state prison following an unsuccessful commitment to the Youth Authority is not entitled to conduct credits for the period under Youth Authority control, since the Youth Authority had alternative procedures for reducing his period in confinement to reward good conduct. (People v. Reynolds (1981) 116 Cal. App.3d 141, 144-148 [171 Cal. Rptr. 461].) (1b) Nevertheless, such reasoning is inapplicable where a defendant is referred to CYA for a 90-day diagnostic evaluation to determine whether he should be committed to CYA or sent to prison. In such a situation, the defendant's time at the Youth Authority is custodial time pure and simple; a diagnostic study to determine future amenability for treatment does not, in itself, have as its goal rehabilitation and treatment. Just as a rose is a rose (see Gertrude Stein, Sacred Emily (1913)), confinement is confinement insofar as the defendant's personal liberty is concerned whether it be in an adult facility for diagnosis and evaluation under Penal Code section 1203.03 or whether it be in a youth facility for a diagnostic evaluation under Welfare and Institutions Code section 707.2.
(3) Having determined that appellant would have been entitled to conduct credits for the time he spent at CYA, we now must determine how many credits can properly be deducted for his misbehavior while at CYA. Specifically, appellant "was highly aggressive, and threatened the case worker. Was placed in the security room, and was found there to be in possession of a piece of metal fashioned into some sort of weapon, and also, continued to threaten the life of staff members...."
Penal Code section 2932 read, at the time of appellant's confinement: "(a) Not more than 90 days of good behavior credit nor more than 30 days *116 of participation credit may be denied or lost during any eight-month period during which the misbehavior or failure to participate took place...." Appellant, therefore, could conceivably lose 90 days for misbehavior at CYA. However, Penal Code section 2931 provided, at the time of appellant's confinement:
"(a) In any case in which an inmate was sentenced to the state prison ... the Department of Corrections shall have the authority to reduce the term prescribed under such section by one-third for good behavior and participation consistent with subdivision (d) of Section 1170.2.
".... .... .... .... .... .... .
"(b) Total possible good behavior and participation credit shall result in a four-month reduction for each eight months served in prison or in a reduction based on this ratio for any lesser period of time. Three months of this four-month reduction,... shall be based upon forbearance from ...:
"(1) Assault with a weapon; or escape.
"(2) Physically assaultive behavior; possession of a weapon without permission; possession of controlled substances without prescription; attempt to escape; or urging others by words or acts, with the intent to cause a riot, to commit acts of force or violence, at a time and place under circumstances which produce a clear and present and immediate danger of a riot which results in acts of force or violence; or active participation in a riot that results in acts of force or violence.
"(3) Intentional destruction of state property valued in excess of fifty dollars ($50); falsification of a significant record or document; possession of escape tools without permission; or manufacture, sale or unauthorized possession or use of alcoholic beverages ...; or urging of others by words or acts, with the intent to cause a riot, to commit acts of force or violence at a time and place under circumstances which present a clear and present and immediate danger of a riot, or committing any act, with the intent to precipitate a riot, at a time and place under circumstances which present a clear and present and immediate danger of a riot. Activities specified in ... paragraph (2) may result in a maximum denial of good behavior credit of 30 days for each such prohibited activity. ...
"(c) One month of this four-month reduction ... shall be based solely upon participation in work ... activities.... Failure to participate in the specified activities can result in a maximum loss of credit of 30 days for each failure to participate. However, those confined either by choice or due *117 to behavior problems shall be given specified activities commensurate with the custodial status." (Italics added.)
Since the record shows there was only one act of weapon possession, subparagraph (3) would warrant a reduction of 30 days' credits. Appellant's mere threats to CYA employees are not grounds for credit reductions under this code section. We conclude that only 30 days should have been deducted from appellant's maximum allowable conduct credits.
The judgment of conviction is modified to provide that appellant shall receive conduct credits for the actual time he spent at CYA less 30 days for his misconduct at CYA. The trial court is directed to modify the abstract of judgment to reflect that appellant is entitled to 280 (not 288) days of actual custody credits as pronounced by the trial court at time of sentence.
The trial court is further directed to prepare an amended abstract of judgment which reflects said modifications and to forward a certified copy of same to the Department of Corrections which is directed to file same. In all other respects, the judgment is affirmed.
Andreen, J., and Woolpert J., concurred.
