(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.