83 OG No. 28, 3220-E Supp. (July 13, 1987)
"Art. 29. Period of preventive imprisonment deducted from term of imprisonment. - Offenders or accused who have undergone preventive imprisonment shall be credited in the service of their sentence consisting of deprivation of liberty, with full time during which they have undergone preventive imprisonment, if the detention prisoner agrees voluntarily in writing to abide by the same disciplinary rules imposed upon convicted prisoners except in the following cases:DONE in the City of Manila, this 10th day of July, in the year of Our Lord, nineteen hundred and eighty-seven.
1. When they are recidivists, or have been convicted previously twice or more times or any crime; and
2. When upon being summoned for the execution of their sentence they have failed to surrender voluntarily.
If the detention prisoner does not agree to abide by the same disciplinary rules imposed upon convicted prisoners, he shall be credited in the service of his sentence four-fifths of the time during which he has undergone preventive imprisonment.
Whenever an accused has undergone preventive imprisonment for a period equal to or more than the possible maximum imprisonment of the offense charged to which he may be sentenced and his case is not yet terminated, he shall be released immediately without prejudice to the continuation of the trial thereof or the proceeding on appeal, if the same is under review. In case the maximum penalty to which the accused may be sentenced is destierro, he shall be released after thirty (30) days of preventive imprisonment."