Any person who is sentenced to a term of confinement in a correctional facility shall have deducted from any such term all time actually spent by the person in a state hospital for examination purposes or treatment prior to trial, in a state or local correctional facility awaiting trial or pending an appeal, or in a juvenile detention facility awaiting trial for an offense for which, upon conviction, such juvenile is sentenced to an adult correctional facility. When entering the final order in any such case, the court shall provide that the person so convicted be given credit for the time so spent.In no case shall a person be allowed credit for time not actually spent in confinement or in detention. In no case is a person on bail to be regarded as in confinement for the purposes of this statute. No such credit shall be given to any person who escapes from a state or local correctional facility or is absent without leave from a juvenile detention facility.Any person sentenced to confinement in a state correctional facility, in whose case the final order entered by the court in which he was convicted fails to provide for the credit authorized by this section, shall nevertheless receive credit for the time so spent in a state correctional facility. Such allowance of credit shall be in addition to the good conduct allowance provided for in Articles 2 (§ 53.1-192 et seq.) and 3 (§ 53.1-198 et seq.) of this chapter or the earned sentence credits provided for in Article 4 (§ 53.1-202.2 et seq.) of this chapter.
Code 1950, § 53-208; 1968, c. 105; 1970, c. 648; 1982, c. 636; 1984, c. 313; 1994, 2nd Sp. Sess., cc. 1, 2.