18 U.S. Code § 3585. Calculation of a term of imprisonment

(a)Commencement of Sentence.—
A sentence to a term of imprisonment commences on the date the defendant is received in custody awaiting transportation to, or arrives voluntarily to commence service of sentence at, the official detention facility at which the sentence is to be served.
(b)Credit for Prior Custody.—A defendant shall be given credit toward the service of a term of imprisonment for any time he has spent in official detention prior to the date the sentence commences—
(1)
as a result of the offense for which the sentence was imposed; or
(2)
as a result of any other charge for which the defendant was arrested after the commission of the offense for which the sentence was imposed;
that has not been credited against another sentence.
Effective Date

Section effective Nov. 1, 1987, and applicable only to offenses committed after the taking effect of this section, see section 235(a)(1) of Pub. L. 98–473, set out as a note under section 3551 of this title.