This section applies where a court dealing with an offender for an offence imposes, or is considering whether to impose, an extended sentence of detention in a young offender institution under section 266.
The appropriate custodial term is the term of detention in a young offender institution that would be imposed in respect of the offence in compliance with section 231(2) (length of discretionary custodial sentences: general provision) if the court did not impose an extended sentence.
The term of the extended sentence must not exceed the maximum term of imprisonment with which the offence is punishable in the case of a person aged 21 or over.