
952 So.2d 611 (2007)
STATE of Florida, Appellant,
v.
Felix PEREZ, Appellee.
No. 2D06-638.
District Court of Appeal of Florida, Second District.
March 30, 2007.
Bill McCollum, Attorney General, Tallahassee, and Donna S. Koch, Assistant Attorney General, Tampa, for Appellee.
James Marion Moorman, Public Defender, and Kevin Briggs, Assistant Public Defender, Bartow, for Appellant.
DANAHY, PAUL W., Senior Judge.
The State challenges the trial court's grant of a motion to dismiss the information filed against Felix Perez on charges of burglary. Because the trial court based its ruling on an incorrect version of the statute of limitation, we reverse.
For offenses occurring on May 27, 1998, Perez was charged with burglary in violation of section 810.02(3), Florida Statutes (1997). Shortly after the offense, but before he was arrested for it, he was arrested on a New Jersey warrant in Pinellas County and was extradited to New Jersey. Later, following confirmation of fingerprint identification, an information was filed and a capias issued on March 8, 2000. The Clearwater Police Department then conducted a search and determined that Perez was in a New Jersey prison. The Department took no further action at that time. The record shows that Perez remained in New Jersey from August 1998 to September 2005.
*612 On September 29, 2005, Perez was arrested in Pinellas County on the capias. Perez filed a motion to dismiss the information, alleging that the statute of limitation had expired because more than three years had elapsed between the filing of the information and the execution of the capias. The trial court granted the motion and the State appeals.
We review de novo the trial court's order granting Perez's motion to dismiss. State v. Pasko, 815 So.2d 680, 681 (Fla. 2d DCA 2002). The purpose of a motion to dismiss is to allow a pretrial determination of the law of the case when there are no material facts in dispute. Id. In this case, the parties concede that there are no material facts in dispute.
In his motion to dismiss, Perez relied on State v. Mack, 637 So.2d 18 (Fla. 4th DCA 1994). The decision in Mack was based on that court's interpretation of the 1981 version of section 775.15, Florida Statutes, which provided:
(2)(b) A prosecution [for felonies other than first degree] must be commenced within 3 years after it is committed.
(5) A prosecution is commenced when either an indictment or information is filed, provided the capias, summons, or other process issued on such indictment or information is executed without unreasonable delay. In determining what is reasonable, inability to locate the defendant after diligent search or the defendant's absence from the state shall be considered.
In Mack, the circuit court found that the State failed to conduct a diligent search to determine Mack's whereabouts, and that the delay caused by the State's lack of effort was unreasonable. The district court affirmed. In the instant case, the trial court relied on Mack in granting Perez's motion to dismiss. This was error. Because the statute was significantly changed in 1997, prior to the date of Perez's offense, the holding in Mack is not applicable here.
The applicable statute of limitation is that which was in effect at the time of the offense giving rise to the criminal charges. Brown v. State, 674 So.2d 738, 740 n. 1 (Fla. 2d DCA 1995). The date of Perez's charged offense is May 27, 1998, therefore, the 1997 version of the statute, which became effective on July 1, 1997, applies. Ch. 97-90, § 7 at 521, Laws of Fla. Although the 1997 version of section 775.15(2)(b) still provides that prosecution must be commenced within three years of the commission of the crime, section 775.15(5)(b) significantly changes the application of that limitation:
A prosecution on a charge on which the defendant has not previously been arrested or served with a summons is commenced when either an indictment or information is filed, provided the capias, summons, or other process issued on such indictment or information is executed without unreasonable delay. In determining what is reasonable, inability to locate the defendant after diligent search or the defendants absence from the state shall be considered. The failure to execute process on or extradite a defendant in another state who has been charged by information or indictment with a crime in this state shall not constitute an unreasonable delay.

§ 775.15(5)(b), Fla. Stat. (1997). (Emphasis on language added in 1997). Section 775.15(6) was also significantly changed:
The period of limitation does not run during any time when the defendant is continuously absent from the state or has no reasonably ascertainable place of abode or work within the state. This provision shall not extend the period of *613 limitation otherwise applicable by more than three years, but shall not be construed to limit the prosecution of a defendant who has been timely charged by indictment or information or other charging document and who has not been arrested due to his or her absence from this state or has not been extradited for prosecution from another state.

§ 775.15(6), Fla. Stat. (1997). (Emphasis on language added in 1997).
In this case, the prosecution was timely commenced because the information was filed on March 8, 2000, less than two years after the date of the offense, May 27, 1998. Although Perez was not arrested until September 29, 2005, he admits that, but for about three months, he was continuously out of the State of Florida for the entire period in question. As a result, under the circumstances of this case, sections 775.15(5)(b) and (6) tolled the statute of limitation for as long as Perez remained absent from Florida and relieved the State from any obligation to attempt to extradite Perez from New Jersey.[1]
We therefore conclude that the trial court's decision to grant Perez's motion to dismiss was based on an application of an incorrect version of the statute and must be reversed.
Accordingly, we reverse and remand with directions to reinstate the information.
ALTENBERND and KELLY, JJ., Concur.
NOTES
[1]  Perez argues that the 1997 version of section 775.15 does not relieve the State from having to conduct a diligent search. We agree. See Cunnell v. State, 920 So.2d 810, 813 (Fla. 2d DCA 2006). The "diligent search" requirement, however, was satisfied here, since the State, at all relevant times, knew Perez's whereabouts.
