When an order for continued detention is made as provided in Section 1801, the control of the authority over the person shall continue, subject to the provisions of this chapter, but, unless the person is previously discharged as provided in Section 1766, the authority shall, within two years after the date of that order in the case of persons committed by the juvenile court, or within two years after the date of that order in the case of persons committed after conviction in criminal proceedings, file a new application for continued detention in accordance with the provisions of Section 1800 if continued detention is deemed necessary. These applications may be repeated at intervals as often as in the opinion of the authority may be necessary for the protection of the public, except that the department shall have the power, in order to protect other persons in the custody of the department to transfer the custody of any person over 21 years of age to the Director of Corrections for placement in the appropriate institution.
Each person shall be discharged from the control of the authority at the termination of the period stated in this section unless the authority has filed a new application and the court has made a new order for continued detention as provided above in this section.
Ca. Welf. and Inst. Code § 1802