PERLUSS, P. J.
Robert N. Daniels appeals from the judgment entered after the trial court sustained Western Exterminator Company's demurrer to his complaint without leave to amend, ruling Daniels's claims for negligence, breach of warranty and breach of contract were time-barred. We reverse.
On October 18, 2013 Daniels sued Western Exterminator Company for negligence, breach of contract and breach of warranty arising out of repairs Western Exterminator made to his home. According to the allegations in the complaint, in November 2003 Western Exterminator agreed to repair an elevated walkway on Daniels's property that had suffered wood damage from termite and fungus infestations. In accordance with the agreement, that same month Western demolished walls at designated areas of the elevated walkway and removed and replaced "60 feet of support headers, 60 feet of support plate[,] 150 feet of tongue and groove under the framing." It also reinstalled stucco walls and replaced surface tile.
In June 2013 visible cracks appeared on the surfaces where Western Exterminator had performed its repairs, and the walkway started to collapse. According to the complaint, an immediate investigation revealed extreme moisture intrusion into the framing of the walkway, resulting in "significant levels of wood rot degradation in the soffit of the elevated walkway sheathing and supporting beams. The resulting wood rot weakened the structural integrity of the walkway, leading to cracking and partial collapse of the walkway." Daniels alleged the damage was caused by Western Exterminator's negligent repair work and the construction defect was latent and not discoverable with reasonable investigation until cracks appeared in June 2013.
Western Exterminator demurred to the complaint arguing each of the causes of action had accrued in November 2003 when the contract was made and the work performed and the complaint was time-barred under all applicable statute of limitations. It also argued Daniels's complaint, filed nine years and 11 months after the work was performed, was not protected by the "10-year limitations period for latent construction defects" in Code of Civil Procedure section 337.15
The trial court sustained Western Exterminator's demurrer without leave to amend, ruling section 337.15's 10-year limitations period did not apply because Western Exterminator did not "develop, design [or] construct" the walkway and, without the "benefit" of the 10-year limitations period, Daniels's claims, filed nine years and 11 months after the work was performed, were time-barred.
A demurrer tests the legal sufficiency of the factual allegations in a complaint. We independently review the superior court's ruling on a demurrer and determine de novo whether the complaint alleges facts sufficient to state a cause of action or discloses a complete defense. (Loeffler v. Target Corp. (2014) 58 Cal.4th 1081, 1100; McCall v. PacifiCare of Cal., Inc. (2001) 25 Cal.4th 412, 415.) We assume the truth of the properly pleaded factual allegations, facts that reasonably can be inferred from those expressly pleaded and matters of which judicial notice has been taken. (Evans v. City of Berkeley (2006) 38 Cal.4th 1, 20; Schifando v. City of Los Angeles (2003) 31 Cal.4th 1074, 1081.) We liberally construe the pleading with a view to substantial justice between the parties. (§ 452; Schifando, at p. 1081.) The application of a statute of limitations based on facts alleged in the complaint is a legal question subject to de novo review. (Aryeh v. Canon Business Solutions (2013) 55 Cal.4th 1185, 1191 (Aryeh).)
The statute of limitations is a legislatively prescribed time period to bring a cause of action. (Fox v. Ethicon Endo-Surgery, Inc. (2005) 35 Cal.4th 797, 806 ["`[c]ivil actions, without exception, can only be commenced within the periods prescribed . . . after the cause of action shall have accrued"]; Aryeh, supra, 55 Cal.4th at p. 1191.) A claim accrues "`"when [it] is complete with all of its elements"—those elements being wrongdoing, harm, and causation.'" (Aryeh, at p. 1191.) Under the discovery rule a cause of action does not accrue, and the limitations period does not begin to run, until the defect would have been discoverable by reasonable inspection. (Lantzy v. Centex Homes (2003) 31 Cal.4th 363, 369 (Lantzy); see Aryeh, at p. 1192 [discovery rule "`postpones accrual of a cause of action until the plaintiff discovers, or has reason to discover, the cause of action'"]; Norgart v. Upjohn Co. (1999) 21 Cal.4th 383, 397 [same].)
For construction defects the limitations period is three years from accrual for tort claims (§ 338, subd. (b)) or four years if the action is based on a written contract or warranty (§ 337, subd. 1). For latent construction defects, that is, deficiencies not capable of being discovered by reasonable inspection (see § 337.15, subd. (b) [a "`latent deficiency' means a deficiency which is not apparent by reasonable inspection"]), section 337.15 prescribes an additional outer limit beyond which a claim is barred. Specifically, that section—a statute of repose
Daniels alleged the repairs to the walkway were performed and substantially completed in November 2003, but the defects were latent and not discoverable with reasonable inspection until June 2013 when cracks in the walkway first appeared. Assuming those allegations are true, as we must in connection with a demurrer (and Western Exterminator points to no allegations in the complaint contradicting them), the causes of action for breach of contract, breach of warranty and negligence, filed just a few months after Daniels discovered the cracks, were well within the three- and four-year limitations periods for tort and contract claims relating to injury to property. Moreover, the action, filed nine years and 11 months after the repairs were substantially completed, complied with section 337.15's absolute bar on latent defect claims. Thus, on the face of the complaint, Daniels's claims are timely.
Western Exterminator's arguments to the contrary miss the mark. First, Western Exterminator disregards the discovery rule and simply assumes, without citation to any pertinent authority, the causes of action accrued when the contract was signed and the work performed. That is wrong. (See Lantzy, supra, 31 Cal.4th at p. 369 [explaining discovery rule]; Aryeh, supra, 55 Cal.4th at pp. 1191-1192 [same]; Landale-Cameron Court, Inc. v. Ahonen (2007) 155 Cal.App.4th 1401, 1407 [same].) Second, it misapprehends section 337.15, incorrectly considering it to be a statute of limitations rather than a statute of repose. Western Exterminator spends nearly the entirety of its appellate brief explaining the reason section 337.15 does not apply to Daniels's claims. For example, it argues it did not develop the property or construct the type of improvements that fall under the purview of the statute. That argument, whether or not correct on its merits, is not helpful to Western Exterminator. If section 337.15 applies, it is no bar because the claim was timely filed within the statute's 10-year period. If, as Western Exterminator argues, section 337.15 does not apply, step two of the two-step process outlined in Lantzy is unnecessary; and the complaint, filed within the applicable limitations periods following accrual in accordance with the discovery rule, is timely. (See § 338, subd. (b); 337, subd. 1.) Either way, on the face of the complaint, Daniels's action is timely.
The judgment is reversed, and the matter remanded with directions to the trial court to vacate its order sustaining Western Exterminator's demurrer to Daniels's complaint without leave to amend and to enter a new order overruling Western Exterminator's demurrer in its entirety. Daniels is to recover his costs on appeal.
ZELON, J. and BLUMENFELD, J.