; (ii) the offense described in clause (i) was committed while the person was on release pending trial for a Federal, State, or local offense; and (iii) a period of not more than five years has elapsed since the date of conviction, or the release of the person from imprisonment, for the offense described in clause (i), whichever is later. . (7) By striking subsections (g) through (j). (8) By adding at the end the following: (g) Contents of release and detention order (1) Contents of release order If the judicial officer orders pretrial release, the judicial officer shall— (A) in cases where the judicial officer imposes conditions of release under subsection (c), provide written findings of fact and a written statement of reasons explaining why any conditions imposed is the least restrictive necessary to reasonably mitigate any individualized and specific risks posed by the person; (B) include a written statement that sets forth all the conditions to which the release is subject, in a manner sufficiently clear and specific to serve as a guide for the person’s conduct; and (C) advise the person of— (i) the penalties for violating a condition of release, including the penalties for committing an offense while on pretrial release; (ii) the consequences of violating a condition of release, including the immediate issuance of a warrant for the person’s arrest