Any individual who is committed to the custody of the Morgan County Sheriff or the jail of any municipality in Morgan County may be required, as a condition of release, probation, or sentence, to serve weekends or such other times or intervals of time as directed by the court having jurisdiction. While in custody the individual shall be the responsibility of the Morgan County Sheriff or the individual or agency designated to operate the specified municipal jail and shall be subject to their respective rules and regulations. A defendant shall receive one day's credit toward his or her sentence for each whole day of confinement in the specified jail. If a defendant spends part of a day released and a part of that same day confined, then he or she shall receive one day's credit toward his or her sentence.
Ala. Code § 45-52-234.21 (1975)