
275 Kan. 521 (2003)
66 P.3d 870
CITY OF NORTON, KANSAS, Appellee,
v.
JASON HURT, Appellant.
No. 89,016
Supreme Court of Kansas
Opinion filed April 18, 2003.
Daniel C. Walter, of Ryan, Walter & McClymont, Chtd., of Norton, argued the cause and was on the brief for appellant.
R. Douglas Sebelius, city prosecutor, argued the cause and was on the brief for appellee.
The opinion of the court was delivered by
GERNON, J.:
Jason Hurt appeals his sentence for driving under the influence (DUI), claiming the enhanced sentencing provisions of Kansas law relating to DUI violate the constitutional prohibition against ex post facto laws.
Hurt was arrested for DUI in August 2001 inside the city limits of Norton. Hurt was charged with a second offense DUI because he had a previous DUI diversion in 1995.
Hurt pled guilty in municipal court to the 2001 DUI but moved to be sentenced as a first offender, which was denied.
Hurt appealed to the district court, arguing that it was constitutionally impermissible to apply the enhanced sentencing provisions of the city ordinance. The district court upheld his sentence. Hurt appealed, and this court transferred the appeal pursuant to K.S.A. 20-3018(c).


*522 Statutory and Ordinance Provisions
The Kansas Legislature in 2001 amended the DUI statute, K.S.A. 8-1567. Before the effective date of that amendment, July 1, 2001, K.S.A. 2000 Supp. 8-1567(k)(3) contained a provision which stated that for sentencing purposes, any conviction over 5 years old would not be considered for charging or sentencing purposes if the same individual was later charged with DUI. These provisions are referred to as "decay" provisions in the law.
The 2001 amendment to 8-1567(k)(3) removed the decay period. The new language stated that "any convictions occurring during a person's lifetime shall be taken into account when determining the sentence to be imposed for a first, second, third, fourth or subsequent offender." See K.S.A. 2002 Supp. 8-1567(l)(3).
Following the lead of the legislature, the City of Norton amended its city ordinance No. 1496 to conform with the version of 8-1567 effective July 1, 2001.

Hurt's Argument
Hurt argues that sentencing him as a second offender violates the prohibitions of the United States Constitution against ex post facto laws.
Hurt contends that once the 5-year period ran on his first DUI, a diversion, he no longer had a "conviction" on his record and he has a vested right in that status that cannot be changed by a subsequent act of the legislature or another governmental subdivision.
Two elements are required for a law to constitute an ex post facto law. The law must apply to events that occurred before its enactment, and the law must alter the definition of criminal conduct or increase the penalty for criminal conduct. Anderson v. Bruce, 274 Kan. 37, 42-43, 50 P.3d 1 (2002).
States generally are prohibited from enacting an ex post facto law. U.S. Const. art. 1, § 10, cl. 1.
A function of the Ex Post Facto Clause is to bar enactments which, by retroactive operation, increase the punishment for a crime after its commission. Collins v. Youngblood, 497 U.S. 37, 42, 111 L. Ed. 2d 30, 110 S. Ct. 2715 (1990).
*523 In Anderson v. Bruce, this court validated a 1983 amendment to K.S.A. 21-4608 which excluded time spent on parole from prison calculations like parole eligibility, conditional release, and maximum dates after the commission of a new offense. 274 Kan. at 43-48. Anderson attacked the amendment as an ex post facto law, claiming that the amendment enhanced the punishment for a crime he committed in 1979 when the time spent on parole was included in the prison calculations. Anderson had been paroled on his 1979 sentence in 1984 but re-offended in 1985. Emphasizing the fact that Anderson's new offense occurred 2 years after the statute was modified, the Anderson court stated:
"Anderson had adequate notice that commission of a new offense would result in the denial of credit for time spent on parole. Anderson was not receiving an increased punishment on his prior offense, but an increased punishment on his new offenses because they were committed while he was on parole. Thus, there was no ex post facto violation in denying Anderson credit for the time spent on parole for his 1979 offense, even though the law in effect at the time of the commission of that offense would have provided for such credit." 274 Kan. at 47-48.
The same is true here. Hurt's violation occurred after the effective date of the amended ordinance. For legislation to violate the ex post facto prohibition, the criminal conduct must have occurred before the law was enacted. See Anderson, 274 Kan. at 43.
The Kansas Court of Appeals' decision in State v. Campbell, 9 Kan. App. 2d 474, 681 P.2d 679 (1984), dealt with a very similar issue. In Campbell, Campbell's sentence for a DUI conviction was enhanced because of a previous DUI conviction. Campbell argued that the enhanced punishment for subsequent DUI convictions was an ex post facto law because 8-1567 did not impose mandatory penalties for repeat DUI offenses when he committed his first DUI. Relying on State v. Jones, 214 Kan. 568, 521 P.2d 278 (1974) (upholding the enhanced penalty in the habitual criminal statute for driving without a license), the Court of Appeals rejected Campbell's claims and determined that the increased penalties for multiple DUI convictions in K.S.A. 8-1567 did not impose an ex post facto law. 9 Kan. App. 2d at 477.
*524 The amendment to the Norton city ordinance is further supported by decisions in other states that have upheld amendments to their DUI statutes increasing the decay period for determining the level of punishment. See State v. Stoen, 596 N.W.2d 504, 507-08 (Iowa 1999) (upholding a 6-year increase in the decay period as applied to defendant who violated the amended statute only 52 days after the amendment was effective); State v. Rolen, 662 So. 2d 446, 448-49 (La. 1995) (upholding an amendment that extended the decay period from 5 years to 10 years); State v. Chapman, 685 A.2d 423, 424-25 (Me. 1996) (upholding a 4-year increase in the decay period and noting that the defendant had fair notice of the change in the statute which occurred 92 days before the violation); State v. Hansen, 258 Neb. 752, 754-55, 605 N.W.2d 461, 463-64 (2000) (upholding 4-year increase in the decay period); State v. Nilson, 364 N.W.2d 532, 533-34 (S.D. 1985) (approving 1-year increase in the decay provision of DUI statute even though it was not applicable to Nilson's two prior convictions).
Enhancement statutes, like sentencing guidelines or recidivist statutes, are common in state criminal laws and do not change the penalty imposed for the earlier conviction. Nichols v. United States, 511 U.S. 738, 747, 128 L. Ed. 2d 745, 114 S. Ct. 1921 (1994). The amended Norton ordinance did not operate retroactively to increase the penalty for Hurt's prior DUI offense. Instead, the amended ordinance became effective prior to Hurt's second DUI violation and increased the penalty for the second violation only. Because the amendment does not affect Hurt's actions prior to its effective date, it is not an ex post facto law.
Affirmed.
ABBOTT J., and NUSS, J., not participating.
LARSON, S.J., and CHRISTEL E. MARQUARDT, J., assigned.
