Except in infraction cases, when probation is granted, the court, in addition to conditions imposed pursuant to section 559.021, may require as a condition of probation that the offender submit to a period of detention up to forty-eight hours after the determination by a probation or parole officer that the offender violated a condition of continued probation or parole in an appropriate institution at whatever time or intervals within the period of probation, consecutive or nonconsecutive, the court shall designate, or the division of probation and parole shall direct. Any person placed on probation in a county of the first class or second class or in any city with a population of five hundred thousand or more and detained as herein provided shall be subject to all provisions of section 221.170, even though he or she was not convicted and sentenced to a jail or workhouse.
§ 559.026, RSMo