In determining the restrictions on liberty to be imposed by a community order in respect of an offence, the court may have regard to any period for which the offender has been remanded in custody in connection with—
For this purpose, a person is remanded in custody if—
The reference in subsection (2)(b) to being remanded to youth detention accommodation—