
949 So.2d 295 (2007)
Andrew and Donna BOTT, Appellants,
v.
CITY OF MARATHON, Appellee.
No. 3D06-1261.
District Court of Appeal of Florida, Third District.
February 14, 2007.
Rehearing Denied March 15, 2007.
Lee Robert Rohe, Summerland Key, for appellants.
Stearns Weaver Miller Weissler Alhadeff & Sitterson and Mark D. Solov and John R. Herin, Jr. and Adam M. Schachter, Marathon, for appellee.
Before WELLS and CORTIÑAS, JJ., and SCHWARTZ, Senior Judge.
*296 CORTIÑAS, Judge.
The plaintiffs, Andrew and Donna Bott (the "Botts"), appeal from an order dismissing their amended complaint against the defendant, the City of Marathon ("City"), with prejudice. We affirm.
On May 1, 2000, the Botts executed and recorded an Affordable Housing Restrictive Covenant ("Covenant") with the City. Several years later, the Botts chose to sell their home and inquired with the City Planner as to the allowable sales price for their home as restricted by the Covenant. The City responded, informing the Botts that, pursuant to the terms of the Covenant, a purchaser must meet the affordable housing income criteria of the City's code. Subsequently, on September 30, 2005, the Botts filed a declaratory judgment action against the City.
The City moved to dismiss the Botts' complaint arguing that the claims were barred by the applicable statute of limitations. The Botts did not respond to the City's motion and, instead, filed an amended pleading. The amended complaint alleged that, pursuant to the Covenant, the Botts' causes of action did not accrue until the certificate of occupancy ("CO") was issued by the City on June 17, 2002.[1] Thereafter, the City moved to dismiss the amended complaint on the grounds that the claims, as alleged, remained time barred, and also because the Botts failed to state a claim upon which relief could be granted. The trial court granted the City's motion to dismiss with prejudice.
We find that the facts pled in the Botts' complaint conclusively establish that the claims are time barred as a matter of law and, thus, dismissal was proper.
A motion to dismiss a complaint based on the expiration of the statute of limitations should be granted "in extraordinary circumstances where the facts constituting the defense affirmatively appear on the face of the complaint and establish conclusively that the statute of limitations bars the action as a matter of law."
Alexander v. Suncoast Builders, Inc., 837 So.2d 1056, 1057 (Fla. 3d DCA 2002) (quoting Rigby v. Liles, 505 So.2d 598, 601 (Fla. 1st DCA 1987)). Furthermore, when considering a motion to dismiss, a trial court is required to consider any exhibit attached to, or incorporated in the pleading. See Harry Pepper & Assoc., Inc. v. Lasseter, 247 So.2d 736, 736 (Fla. 3d DCA 1971) (stating that "[i]n considering a motion to dismiss the trial court was required to consider the exhibit . . . attached to and incorporated in the amended complaint" and quoting Florida Rule of Civil Procedure 1.130(b), providing that "[a]ny exhibit attached to a pleading shall be considered a part thereof for all purposes"). Here, a photocopy of the Covenant was attached as an exhibit to the amended complaint. The Covenant clearly indicated that the contract was executed with the City on May 1, 2000.
We find no merit in the Botts' contention that the issuance of the CO was a condition precedent which had to occur before the limitations period began to accrue. Here, the lawsuit was in the nature of a declaratory judgment action. All of the elements required to prevail in a declaratory judgment were present from the *297 date of execution of the contract, thus, the Botts' cause of action accrued on such date. See City of Hollywood v. Petrosino, 864 So.2d 1175, 1177-78 (Fla. 4th DCA 2004)(finding that to state a cause of action for declaratory relief five elements must be met, including a present controversy as to an ascertainable state of facts and a present and adverse interest in the subject matter) (citations omitted). Accordingly, any action predicated on this contract had to commence within five (5) years from May 1, 2000. See § 95.11(2)(b), Fla. Stat. (2000) (providing a five year statute of limitations applicable to a legal or equitable action on a contract founded on a written instrument). Because the Botts filed the original complaint on September 30, 2005, five months after the expiration of the limitations period, their claims are time barred.
Affirmed.
WELLS, J., concurs.
SCHWARTZ, Senior Judge (specially concurring).
I concur in the conclusion on the ground that the complaint patently fails to state a claim upon which relief may be granted under the law.
NOTES
[1]  The Botts relied on the provision in the Covenant that states in relevant part, "[t]he covenant(s) . . . shall not commence running until the Certificate of Occupancy has been issued by the building official for the dwelling unit(s) to which the covenant(s) apply."
