law: Code of Criminal Procedure Act, 1973
  
  428.Period of detention undergone by the accused to be set off against the
  
  sentence of imprisonment.-
  Where an accused person has, on conviction,
  
  been sentenced to imprisonment for a term, the period of detention, if any,
  
  undergone by him during the investigation, inquiry or trial of the same case
  
  and before the date of such conviction, shall be set off against the term of
  
  imprisonment imposed on him on such conviction, and the liability of such person
  
  to undergo imprisonment on such conviction shall be restricted to the
  
  remainder, if any, of the term of imprisonment imposed on him.