(a)
Every person committed to the Department of Corrections and Rehabilitation, Division of Juvenile Facilities, by a juvenile court shall, except as provided in subdivision (b), be discharged upon the expiration of a two-year period of control or when he or she attains 21 years of age, whichever occurs later, unless an order for further detention has been made by the committing court pursuant to Article 6 (commencing with Section 1800).
(b)
Every person committed to the Department of Corrections and Rehabilitation, Division of Juvenile Facilities, by a juvenile court who has been found to be a person described in Section 602 by reason of the violation of any of the offenses listed in subdivision (b) or paragraph (2) of subdivision (d) of Section 707,
shall be discharged upon the expiration of a two-year period of control or when he or she attains 25 years of age, whichever occurs later, unless an order for further detention has been made by the committing court pursuant to Article 6 (commencing with Section 1800).
(c)
Notwithstanding subdivision (b), on and after July 1, 2012, every person committed by a juvenile court to the Department of Corrections and Rehabilitation, Division of Juvenile Facilities, who is found to be a person described in Section 602 by reason of the violation of any of the offenses listed in subdivision (b) or paragraph (2) of subdivision (d) of Section 707, shall be discharged upon the expiration of a two-year period of control, or when he or she attains 23 years of age, whichever occurs later, unless an order for
further detention has been made by the committing court pursuant to Article 6 (commencing with Section 1800). This section shall not apply to persons committed to the Department of Corrections and Rehabilitation, Division of Juvenile Facilities, by a juvenile court prior to July 1, 2012, pursuant to subdivision (b).
(d)
The amendments to this section made by the act adding this subdivision shall apply retroactively.