Use of an amended statute extending the maximum period within which a prior DUI conviction may be used did not violate ex post facto clause. Appellant had two prior DUI convictions, one in 1997 and one in 2001. In 1997, sections 23540 and 23546 provided that prior DUI convictions increase punishment for subsequent convictions occuring within seven years. In 2005, the Legislature extended the period to ten years. In 2006, appellant was charged with DUI offenses, and his prior convictions were used to enhance his sentence. On appeal, he argued that this was a violation of the ex post facto clause. The appellate court affirmed the judgment, finding no constitutional violation. In People v. Sweet, the court previously held that there was no constitutional violation when the statute was extended from five years to seven years. Appellant argued that Sweet was no longer good law because Stogner v. California compelled a different result. However, unlike Stogner, appellant was not charged with a crime for which the statute of limitations has run, and was not deprived of a defense. A sentence imposed on a habitual offender is not an additional punishment for the earlier crime, but a punishment for the later crime which is aggravated because of its repetitive nature.