
    East Suffolk Development Corp., Respondent, v Town Board of Town of Riverhead et al., Appellants.
    [874 NYS2d 216]
   In an action, inter alia, for a judgment declaring that the adoption of an amendment to the Town of Riverhead Zoning Code is invalid and unconstitutional, the defendants appeal, as limited by their brief, from so much of an order of the Supreme Court, Suffolk County (Emerson, J.), dated September 10, 2007, as denied those branches of their motion which were to dismiss the complaint pursuant to CPLR 3211 (a) (5) as time-barred and to dismiss the second cause of action pursuant to CPLR 3211 (a) (7) for failure to state a cause of action.

Ordered that the order is affirmed, with costs.

The complaint challenges the validity and constitutionality of a local law amending the Town of Riverhead Zoning Code. The challenged local law is clearly legislative in nature, as evinced by its general applicability, indefinite duration, and formal adoption (see Matter of Frontier Ins. Co. v Town Bd. of Town of Thompson, 252 AD2d 928, 930 [1998]; International Paper Co. v Sterling Forest Pollution Control Corp., 105 AD2d 278, 282 [1984]). Thus, a declaratory judgment action, not a CPLR article 78 proceeding, is the proper vehicle to challenge the validity of the defendants’ action (see Matter of Overhill Bldg. Co. v Delany, 28 NY2d 449, 458 [1971]; Hudson Val. Oil Heat Council, Inc. v Town of Warwick, 7 AD3d 572, 574 [2004]). As a proceeding pursuant to CPLR article 78 is not a proper vehicle for challenging the legitimacy of the local law, the limitations period set forth in CPLR 217 is not applicable to this case (see Kamhi v Town of Yorktown, 141 AD2d 607, 609 [1988], affd 74 NY2d 423 [1989]), and the six-year statute of limitations set forth in CPLR 213 (1) applies instead (see Solnick v Whalen, 49 NY2d 224, 229-230 [1980]). Accordingly, the Supreme Court properly denied that branch of the defendants’ motion which was to dismiss the complaint as time-barred (see Caputo v County of Suffolk, 275 AD2d 294, 295 [2000]; Janiak v Town of Greenville, 203 AD2d 329, 330 [1994]).

Contrary to the defendants’ contention, “accepting] the facts as alleged in the complaint as true, according] [the] plaintiffs the benefit of every possible favorable inference, and determining] only whether the facts as alleged fit within any cognizable legal theory” (Leon v Martinez, 84 NY2d 83, 87-88 [1994]; see Kass v Zaslav, 55 AD3d 877 [2008]), the plaintiff presented a viable cause of action for declaratory relief (see Unanue v Town of Gardiner, 105 AD2d 1025 [1984]). Skelos, J.P., Dillon, Angiolillo and Eng, JJ., concur.  