Of course laws can be applied retroactively. As a general rule, they shouldn't be, but they certainly can be and have been. "The Constitution of the United States forbids Congress and the states to pass any ex post facto law. In 1798 it was determined that this prohibition applies only to criminal laws and is not a general restriction on retroactive legislation." (Britannica.)