4. (1) A court—
(a) which convicts a person of an offence against a law of the Territory; and
(b) which, but for the option of making an order under this section, would otherwise sentence the person to a term of imprisonment of not less than 3 months but not more than 24 months;
may, instead of sentencing the person to imprisonment, by order—
(c) sentence the person to complete such number of detention periods at a detention centre, as the court specifies; and
(d) direct that the person be released from custody subject to any order that may be made under subsection 10 (2).
(2) The number of detention periods that a person may be required to serve under an order shall be calculated at the rate of 1 detention period for each week of the term of imprisonment to which the person would otherwise have been sentenced.
(3) An order for periodic detention remains in force until—
(a) the relevant detention periods required to be served under the order, or any detention periods by which the order has been extended under section 25, have been served; or
(b) the order has been cancelled.