For better or worse, laws apply from when they are enacted to when they are repealed or superseded. (Repealed includes laws with clauses that state it only applies for X years or that it needs to be renewed every Y years and the law doesn’t get renewed.)
That being said, there are all too often laws that are technically applicable but whose usefulness has long since passed. In these cases, the law still applies but the state legislature needs to pass a bill to repeal it (or supersede it).