TITLE ONE
CHAPTER I
Fundamental rights
Article 20
B. Defendant’s rights
Preventive prison cannot exceed the time established by law as maximum punishment for the crime in question. In no case, preventive prison shall exceed the term of two years, unless defendant asks for a longer time to prepare his defense. If after said term a sentence has not been pronounced, the defendant shall be freed immediately while the trial continues. However, other precautionary measures may be used.
The duration of detention counts for a sentence term.
Sentencing - national procedures for national proceedings
Determination of sentence - national proceedings
EDIT.