Assume a criminal offence occurred in the past (for example 2015), before a new law was passed at a future date (for example 2016).
What law would be referred to by the judge when it comes to sentencing the offender? I think there is a legal term for this in Latin but I cannot find it.
My question is focusing on the United States and the United Kingdom.
I have done some research, and it appears that ex de facto law is not allowed in the United Kingdom to follow directions given by the European Union. However, I am not sure if this covers my question, as it is for actions that were previously legal, whereas my question is about actions that were illegal and then had changes made to them.