BOOK I-GENERAL PART
TITLE I-THE CRIMINAL LAW
SINGLE CHAPTER-GENERAL PRINCIPLES
Article 2
Temporal applicability
1- Penalties and security measures are determined by the law in force at the time of the commission of the act or the fulfilment of the conditions which they depend on.
2- A punishable act in accordance with the law in force at the moment of its completion ceases
being punishable if a new law eliminates it from the number of infractions; in this case, if there has
been condemnation, even if it has become a definitive sentence, the execution ceases and all its
penal effects.
3- If a law is valid for a determined period of time, an act committed during this period continues to be punishable.
4- If the laws in force at the time of the commission of the punishable act are different from those
established in posterior laws, the regime more favourable to the agent is always applicable, except when the agent has already been condemned by a definitive sentence.
EDIT.