Any convicted person undergoing sentence in the penitentiary not sooner released under the provisions of this chapter, shall in accordance with the provisions of existing law, be discharged from custody upon serving a maximum sentence provided by law for the offense of which such person was convicted, or the maximum term fixed by the court where the law does not provide for a maximum term. Provided however, if the date of discharge from custody falls on a Saturday, Sunday or legal holiday, then the person may be discharged from custody on the last weekday immediately preceding such Saturday, Sunday or legal holiday.
Idaho Code § 20-239