GENERAL PART
Chapter Four
PENALTIES
2. Determination of Sentence
Crediting Time in Detention and Earlier Sentence
Article 63
(1) The time spent in detention, serving the measure of ban to leave abode as well as any other depravation of liberty in relation to a criminal offence shall be credited to the pronounced prison sentence, fine and community service.
(2) If a criminal procedure has been conducted for several criminal offences in joinder, and detention has not been ordered for each of them, the time spent in detention shall be credited to the pronounced prison sentence, fine and community service for the offence of which the accused is convicted.
(3) A prison sentence or a fine which the offender has served or paid for a misdemeanour or commercial offence, as well as sentence or disciplinary measure of depriving of liberty which the offender has served for violation of military discipline shall be credited to the sentence pronounced for a criminal offence whose elements comprise also the elements of a misdemeanour, commercial offence or violation of military discipline.
(4) For each crediting, a day spent in detention, a day of depriving of liberty, a day of imprisonment, day of serving the measure of ban to leave abode, eight hours of community service and one thousand dinars of fine shall be deemed equal.
Reduction of national sentence following pre-trial detention - national proceedings
EDIT.