|,Mr. James Waddell filed a motion to quash a bill of information charging him with a violation of Louisiana Revised Statute 14:98(D)(l)(a),. third offense driving while intoxicated (DWI). Mr. Waddell alleged that his first arrest for driving while intoxicated was outside the ten-year cleansing period set forth in Louisiana Revised Statute 14:98(F)(2) and should not be used to enhance the current offense. The trial court denied the motion and Mr, Waddell filed the instant appeal. While *1027the proper procedural remedy to challenge a motion to quash is an application for a writ of certiorari rather than an appeal, we find no error in the judgment of the trial court.
ERRORS PATENT
Upon review of the record, this Court has identified an error patent. The denial of a motion to quash is not an appealable judgment as it is not a final judgment. However, this Court’s custom is to convert an improperly filed criminal appeal to a writ. State v. Boudreaux, 2011-1345, pp. 4-5 (La.App. 4 Cir. 7/25/12), 98 So.3d 881; State v. Hutchinson, 99-0034, pp. 3-4 (La.App. 4 Cir. 5/17/00), 764 So.2d 1139; La.C.Cr.P. art. 912. Accordingly, Mr. Waddell’s appeal is converted to a writ.
| PROCEDURAL AND FACTUAL HISTORY
Mr. Waddell was charged by bill of information on June 11, 2010 with driving while intoxicated, third conviction, in violation of La. R.S. 14:98(D)(l)(a). The bill of information alleged prior convictions for driving while intoxicated, one on January 5, 2000 and the other on March 4, 2010. Mr. Waddell filed a motion to quash the bill of information asserting that more than ten years had elapsed between “the commission of the predicate DWI and the commission of the instant DWI.” The trial court denied the motion. Thereafter, Mr. Waddell filed this appeal which we have converted to a writ.
The underlying facts are as follows: The State filed a bill of information charging Mr. Waddell with third offense DWI based on his two previous DWI convictions. In 1996, Mr. Waddell was arrested for the first time for DWI. He pled guilty on January 5, 2000 and was sentenced on January 4, 2001 to twelve months’ probation. Mr. Waddell was arrested for the second time for DWI in 2007. He pled guilty to this DWI on March 4, 2010. On June 11, 2010, Mr. Waddell was arrested again for DWI and this time was charged with felony DWI as a third-time offender. This charge is the subject of the motion to quash before us for review.
DISCUSSION
More than ten years has elapsed between the commission of Mr. Waddell’s first DWI in 1996 and his arrest for the alleged third DWI in 2010. As such, Mr. Waddell alleges that pursuant to Louisiana Revised Statute 14:98(F)(2), his first DWI conviction cannot be used as a predicate offense for the purpose of enhancement of the current offense to a third offense DWI.
IsLouisiana Revised Statute 14:98(F)(2) provides that the State cannot use an offender’s predicate DWI convictions to support a charge of multiple offense DWI if the predicate offense(s) is committed more than ten years prior to the instant offense. The statute further provides, however, that in determining this ten-year “cleansing period”, certain periods of time are excluded from the calculation. Time during which the offender was awaiting trial, on probation for a DWI offense, under an order of attachment for failure to appear, or incarcerated in a penal institution in this or any other state is excluded in computing this ten-year period. State v. Kornahrens, 2011-1779, p. 8 (La.App. 1 Cir. 6/8/12), 2012 WL 2061464, unpub. The Louisiana Fifth and Second Circuits have found that the specific language of the statute indicates “the Legislature’s desire for the cleansing period to include only time during which the accused is not under any legal restraints.” State v. Hoerner, 2011-659, p. 5 (La.App. 5 Cir. 2/28/12), 88 So.3d 1128, 1130 (quoting State v. Carter, 45,334 (La.App. 2 Cir. 6/23/10), 42 So.3d 455, 457 (Emphasis original)). Therefore, the total period of time attrib*1028uted to all of the applicable, excludable periods of time cannot be counted in calculating the ten-year cleansing period. State v. Warren, 2011-1262, p. 3 (La.App. 1 Cir. 2/10/12), 91 So.3d 981, 982. Mr. Waddell completed his probation for his first offense on January 4, 2002. He was arrested for this latest offense on June 11, 2010.
Louisiana Revised Statute 14:98(F)(2) was amended by Act 640 of 2008. Mr. Waddell asserts that because his first conviction was prior to this amendment, the Court must look at the version of the law in effect at the time of that conviction to determine its staleness. Prior to 2008, only pei’iods of incarceration were excluded in calculating the cleansing period. As such, Mr. Waddell contends that | ^because he was not incarcerated for his first offense, which occurred more than ten years before the current offense, it cannot be used for enhancement purposes. This argument is without merit.
Article I, § 10 of the United States Constitution and article I, § 23 of the Louisiana Constitution prohibit the ex post facto application of criminal law by the state. For a criminal or penal law to fall within this prohibition, it “must apply to events occurring before its enactment, and it must disadvantage the offender affected by it.” Weaver v. Graham, 450 U.S. 24, 29, 101 S.Ct. 960, 964, 67 L.Ed.2d 17 (1981). However, the Louisiana Supreme Court has held that enlarging a statutory cleansing period does not require an individual to defend past acts for which he has already been convicted and punished, but to measure his future conduct in light of the legislature’s changing perception of significant social problems. State v. Rolen, 95-0347, pp. 5-6 (La.9/15/95), 662 So.2d 446, 449. For purposes of analyzing the ex post facto implications of statutes increasing penalties for future crimes based on past crimes, “the relevant 'offense’ is the current crime, not the predicate crime.” Id. at p. 3, 662 So.2d at 448 (quoting United States, v. Arzate-Nunez, 18 F.3d 730, 734 (9th Cir.1994)). Accordingly, the trial court’s application of Louisiana Revised Statute 14:98(F)(2) as amended in 2008 was appropriate.
Simply by looking at the dates of the two DWI arrests, December 24, 1996 and June 10, 2010, it would appear that the first offense could not be used to enhance the third offense. However, to determine whether Mr. Waddell’s first conviction was properly used as a predicate offense for this current offense, we must determine if any time periods between his offenses fall within the exclusions set out in Louisiana Revised Statute 14:98(F)(2).
IsAlthough Mr. Waddell was first charged with driving while intoxicated in 1996, he did not plead guilty to this offense until January 5, 2000. He was sentenced for this offense on January 4, 2001 to twelve months’ probation. Thus, in accordance with Louisiana Revised Statute 14:98(F)(2), the period of time awaiting trial and the twelve months of probation are not included within the cleansing period. The cleansing period began to run at the conclusion of Mr. Waddell’s probation, January 4, 2002.1 Mr. Waddell’s arrest for the third offense was on June 11, 2010, clearly within the ten-year cleansing period.
The Louisiana Supreme Court has instructed us in State v. Love, 2000-3347, pp. 9-10 (La.5/23/03), 847 So.2d 1198, 1206, that the complementary role of trial courts and appellate courts demands that defer*1029ence be given to a trial court’s discretionary decision. An appellate court is allowed to reverse a trial court judgment on a motion to quash only if that finding represents an abuse of the trial court’s discretion. The trial court found that Mr. Wad-dell failed to carry his burden of proof that his first conviction for DWI could not be used as a predicate offense for the purpose of enhancing the current offense. We find no error in the trial court’s denial of the motion to quash.
CONCLUSION
For the foregoing reasons, Mr. Wad-dell’s appeal is converted to a writ. The writ application is denied.
APPEAL CONVERTED TO WRIT; WRIT DENIED
. Because Mr. Waddell’s third offense falls within the ten-year cleansing period from his first offense, we need not examine any periods of time excluded for his second conviction on March 4, 2010.