Any person who has been sentenced to the Jackson County jail or any city jail within Jackson County and who has been ordered released under Section 45-36-232.20, at the time of sentence or at any time while any part thereof remains unserved, may be required by the sentencing court to report to the jail to which he or she has been sentenced to be incarcerated during weekends or at such times or intervals of time as the court may direct. Time so spent in jail shall be deducted from the term of the sentence. Any part of a day spent in the institution shall count as a full day toward the sentence. In no event shall the number of days confinement exceed the number of days in the original sentence.
Ala. Code § 45-36-232.21 (1975)