When determining an appropriate sentence of imprisonment, the period spent by an accused in detention while awaiting trial, conviction and sentence should not be assessed mechanically (such as by applying a 'rule of thumb' that doubles the pre-trial detention period and deducts it from the proposed sentence). Instead, the period in detention pre-sentencing is but one of the factors that should be taken into account in determining whether the effective period of imprisonment to be imposed is justified and proportionate to the crime committed. The test is not whether pre-trial detention on its own constitutes substantial and compelling circumstances warranting a lesser sentence, but whether the sentence in all the circumstances, including the period spent in detention prior to conviction and sentencing, is a just one. A court must assess, upon consideration of all the circumstances of the particular case, whether the prescribed or proposed sentence is proportionate to the particular offence, taking into account the crime, the criminal, and the needs of society. Particular factors, whether aggravating or mitigating, should not be taken individually and in isolation.