
320 N.W.2d 594 (1982)
Michael P. TRECKER, Appellant,
v.
STATE of Iowa, Appellee.
No. 65911.
Supreme Court of Iowa.
June 16, 1982.
Gary L. McMinimee of Wunschel, Eich & McMinimee, P. C., Carroll, for appellant.
Thomas J. Miller, Atty. Gen., Roxanne Ryan, Asst. Atty. Gen., and Valencia Voyd, Student Intern, for appellee.
Considered by LeGRAND, P. J., and HARRIS, McCORMICK, LARSON, and SCHULTZ, JJ.
LARSON, Justice.
This is an appeal from the district court's denial of postconviction relief, ch. 663A, The Code 1979. The facts are undisputed. The petitioner pled guilty to manslaughter, § 690.10, The Code 1975, arising out of a motor vehicle death. Although he was sentenced to five years imprisonment, sentence was suspended and the petitioner was placed on probation for a two-year period. During this period the petitioner violated the conditions of his probation and, after requesting and receiving a psychiatric examination at Oakdale, from January 24 to March 28, 1979, his probation was revoked. See 908.11, The Code. He was then incarcerated *595 at the Men's Reformatory in Anamosa until the district court ordered reinstatement of the probationary period. See § 902.4, The Code. The petitioner again violated the terms of his probation and again it was revoked. This time the district court reinstated the petitioner's original sentence and ordered that credit was to be given only for the time spent in Anamosa and in the county jail.
This application was subsequently made by the petitioner, who contends he should have been granted credit on his sentence under sections 907.3(2) and 907.11, The Code 1979, for time spent on probation and in confinement for psychiatric examination. The district court did not agree with the petitioner, nor do we.

I. Credit for time served on probation.

In Mills v. State, 308 N.W.2d 65 (Iowa 1981), this court was confronted with an analogous sentencing issue: whether the denial of credit for time spent on probation violated equal protection when parolees were granted credit under section 806.16, The Code, for time served on parole. While no constitutional argument is raised in this case, the State argues that Mills implies a probationer need not receive credit for time spent on probation under section 907.3(2) since there is no "confinement."
Unlike revocations for parole violations, § 906.16, The Code, there is no statute expressly providing that time spent on probation is to be credited to a sentence upon revocation. Section 907.3(2) only provides:
By record entry at the time of or after sentencing, the court may suspend the sentence and place the defendant on probation upon such terms and conditions as it may require including commitment to an alternate jail facility or a community correctional residential treatment facility for a specific number of days to be followed by a term of probation as specified in section 907.7. A person so committed who has probation revoked shall be given credit for such time served.

(Emphasis added.) And section 907.11 provides: "In no case shall the total time served in confinement and in any locally administered correctional program exceed the maximum period of confinement authorized for the public offense of which the defendant stands convicted."
The general rule is that, absent a specific provision allowing for it, a court does not err by denying credit for time served on probation. See A. Campbell, The Law of Sentencing § 82, at 265 (1978). Denial of credit is appropriate under circumstances where the restrictions imposed cannot be equated with incarceration. See Lock v. State, 609 P.2d 539, 543 (Alaska 1980). See generally Annot., Credit for Jail Time Served, 99 A.L.R.3d 781 (1980). While we recognize credit for time spent on parole, there is specific statutory authority for that, § 906.16, The Code, and there is none for probation. Moreover, the concepts of parole and probation are significantly different and justify divergent approaches on the issue of credit to be given upon violation. See Mills, 308 N.W.2d at 67.
The district court did not err in refusing to give the defendant credit for time spent on probation.
II. Credit for time served at Oakdale for psychiatric examination.
Section 907.3(2) provides that a probationer may receive credit on his sentence for time served at an "alternate jail facility." The question is whether Oakdale falls within that phrase.
Under analogous circumstances credit for pretrial detention has been allowed for time spent in hospitals or diagnostic centers. See e.g., People v. Cowsar, 40 Cal.App.3d 578, 579, 115 Cal.Rptr. 160, 161 (1974) (statute providing credit for time spent "in custody in any city, county, or city and county jail" entitles defendant to credit for time spent at state hospital because "all of the permissible purposes of punishment" were served); People v. Gravlin, 52 Mich.App. 467, 217 N.W.2d 404, 405 (1974) (statute providing credit "for such time served in jail" entitles defendant to credit for time spent at state hospital); Commonwealth v. *596 Jones, 211 Pa.Super. 366, 236 A.2d 834, 836 (1967) (statute providing credit "for any days spent in custody" entitles defendant to credit for time spent at state mental hospital). Cf. State v. Shaw, 202 Neb. 766, 277 N.W.2d 106, 111 (1979) (defendant entitled to credit for time spent in diagnostic center for sociopathic illness). Contra Dorfman v. State, 351 So.2d 954, 957 (Fla.1977) (statute providing credit "for all of the time he spent in the county jail" does not entitle defendant to credit for time spent in mental hospital: "There is an obvious difference between confinement in a prison (or in a prison infirmary during the period of imprisonment), as part of a criminal sentence, and a period of treatment in a mental hospital for the purpose of helping the individual to return to society."). See generally Campbell, supra § 82, at 264 ("Many states have explicit statutory authority for crediting any time the offender spent in the state's mental institution; other jurisdictions so provide by caselaw.")
We believe the language of section 907.3(2) is quite specific: A defendant shall be given credit for time served in an "alternate jail facility" or a "community correctional residential treatment facility." Neither of these facilities may be construed to mean merely the equivalent of a jail, or a place where the defendant is confined. An alternate jail facility is specifically defined, and its implementation procedure prescribed, by chapter 356A, The Code. Section 356A.1 requires action by a county board of supervisors to designate a facility as an alternative jail and to maintain it as such. The security medical facility at Oakdale, a state hospital, is simply not such a facility. No claim is made that Oakdale is a community correctional facility. The district court did not err in refusing to give the defendant credit for the time spent there.
We find no error.
AFFIRMED.
