Definition: In this task, you are given text for US Congressional and California state bills, your task is to generate a summary for this bill.
Input: SECTION 1. SHORT TITLE.

This Act may be cited as the ''Prohibiting Detention of Youth
Status Offenders Act of 2017''.

SEC. 2. DEINSTITUTIONALIZATION OF STATUS OFFENDERS.

Section 223 of the Juvenile Justice and Delinquency Prevention Act
of 1974 (42 U.S.C. 5633) is amended--
(1) in subsection (a)(11)--
(A) by striking ''shall'' the first place it
appears;
(B) in subparagraph (A)--
(i) in clause (i), by inserting ''and'' at
the end;
(ii) in clause (ii), by striking ''and'' at
the end;
(iii) by striking clause (iii); and
(iv) in the matter following clause (iii)
by striking ''and'' at the end;
(C) in subparagraph (B), by inserting ''and'' at
the end; and
(D) by adding at the end the following:
''(C) if a court determines the juvenile should be
placed in a secure detention facility or correctional
facility for violating an order described in
subparagraph (A)(ii)--
''(i) the court shall issue a written order
that--
''(I) identifies the valid court
order that has been violated;
''(II) specifies the factual basis
for determining that there is
reasonable cause to believe that the
juvenile has violated such order;
''(III) includes findings of fact
to support a determination that there
is no appropriate less restrictive
alternative available to placing the
juvenile in such a facility, with due
consideration to the best interest of
the juvenile;
''(IV) specifies the length of
time, not to exceed 3 days, that the
juvenile may remain in a secure
detention facility or correctional
facility, and includes a plan for the
juvenile's release from such facility;
and
''(V) may not be renewed or
extended; and
''(ii) the court may not issue a second or
subsequent order described in clause (i)
relating to a juvenile, unless the juvenile
violates a valid court order after the date on
which the court issues an order described in
clause (i);
''(D) there are procedures in place to ensure that
any juvenile held in a secure detention facility or
correctional facility pursuant to a court order
described in this paragraph does not remain in custody
longer than 3 days (with the exception of weekends and
holidays) or the length of time authorized by the
court, or authorized under applicable State law,
whichever is shorter;
''(E) juvenile status offenders detained or
confined in a secure detention facility or correctional
facility pursuant to a court order as described in this
paragraph may only be detained in secure custody one
time in any six-month period, provided that all
conditions set forth in subparagraph (D) are satisfied;
and
''(F) not later than one year after the date of
enactment of this subparagraph, with a single one-year
extension if the State can demonstrate hardship as
determined by the Administrator, the State will
eliminate the use of valid court orders as described in
subparagraph (A)(ii) to provide secure lockup of status
offenders;''; and
(2) by adding at the end the following:
''(g) Applications for Extension for Compliance.--States may apply
for a single one-year extension to comply with subsection (a)(11). To
apply, a State must submit an application to the Administrator
describing--
''(1) the State's measurable progress and good faith effort
to reduce the number of status offenders who are placed in a
secure detention facility or correctional facility pursuant to
a court order as described in this paragraph; and
''(2) the State's plan to come into compliance not later
than 1 year after the date of extension.''.
Output:
Prohibiting Detention of Youth Status Offenders Act of 2017 This bill amends the Juvenile Justice and Delinquency Prevention Act of 1974 to modify the deinstitutionalization of status offenders (DSO) core requirement with which a state must comply to receive funds under the Formula Grant Program. The DSO core requirement prohibits the secure detention or confinement of a juvenile who commits a status offense (i.e., an offense that would not be a crime if committed by an adult). This bill eliminates an exception to the DSO core requirement that permits the secure detention or confinement of an out-of-state runaway youth. It also eliminates, not later than one year after enactment, an exception to the DSO core requirement that permits the secure detention or confinement of a juvenile status offender who violates a valid court order. Until then, use of the valid court order exception to securely detain or confine a juvenile status offender must comply with additional requirements, such as issuance of a written court order and a three-day maximum length of detention.