Nope, they can move out before the law takes effect and retroactive ("ex post facto") laws are not legally valid.