15-196.1. Credits allowed.
The minimum and maximum term of a sentence shall be credited with and diminished by the total amount of time a defendant has spent, committed to or in confinement in any State or local correctional, mental or other institution as a result of the charge that culminated in the sentence or the incident from which the charge arose. The credit provided shall be calculated from the date custody under the charge commenced and shall include credit for all time spent in custody pending trial, trial de novo, appeal, retrial, or pending parole, probation, or post-release supervision revocation hearing: Provided, however, the credit available herein shall not include any time that a defendant has spent in custody as a result of a pending charge while serving a sentence imposed for another offense.