(a) If a judge requires as a condition of community supervision or participation in a pretrial intervention program operated under Section 76.011, Government Code, or a drug court program established under Chapter 123, Government Code, or former law that the defendant serve a term of confinement in a community corrections facility, the term may not exceed 24 months.
(b) A judge who requires as a condition of community supervision that the defendant serve a term of confinement in a community corrections facility may not impose a subsequent term of confinement in a community corrections facility or jail during the same supervision period that, if added to the terms previously imposed, exceeds 36 months.