
82 N.J. 435 (1980)
414 A.2d 9
PHILIP KRUVANT, CHARLES KRUVANT, AND NAOMI KRUVANT, T/A KRUVANT BROS., PLAINTIFFS-APPELLANTS,
v.
THE MAYOR AND COUNCIL OF THE TOWNSHIP OF CEDAR GROVE AND THE BUILDING INSPECTOR OF THE TOWNSHIP OF CEDAR GROVE, DEFENDANTS-RESPONDENTS.
The Supreme Court of New Jersey.
Argued January 8, 1980.
Decided May 12, 1980.
*436 William L. Brach argued the cause for appellant (Brach, Eichler, Rosenberg, Silver, Bernstein & Hammer, attorneys; Raymond I. Korona, on the brief).
Donald E. Morrice argued the cause for respondent (Jardine, Morrice & Pagano, attorneys).
The opinion of the Court was delivered by SCHREIBER, J.
This zoning matter has been pending for eight years. The proceeding commenced in March 1972, when plaintiffs sought a variance to construct 61 garden apartment units in the Township of Cedar Grove on a 5.75-acre tract zoned only for one-family homes. The Board of Adjustment's recommendation for the variance was rejected by the Township Council.
On January 26, 1973 plaintiffs filed a complaint in lieu of prerogative writ, R. 4:69, challenging the denial of the variance and asserting that zoning plaintiffs' property only for single-family *437 homes was unreasonable and arbitrary. The trial court found that denial of the variance was proper, but, after a second hearing, declared that the ordinance was unconstitutional because single-family usage was economically infeasible. The trial court's order, dated February 6, 1974, afforded the municipality 120 days to amend its ordinance. This period was extended another 90 days.
On October 7, 1974, the Township rezoned plaintiffs' property permitting its use as an office building or research laboratory. After another hearing the trial court held the amendment unconstitutional. At this point in time, November 18, 1975, the trial court wrote in its letter opinion:
This litigation has taken far too long and has consumed an unreasonable amount of court time, not to speak of the cost to the litigants.... I will lay down guidelines pursuant to which the municipality must proceed. First, the municipality must consider the use of the premises for all purposes, including single and multiple dwellings of all kinds in its determination as to how to rezone. Second, the municipality must act within 90 days from the date of the Order entered herein. [citations omitted]
The trial court entered its order on December 15, 1975, requiring the Township to enact a suitable and appropriate amendment to its zoning ordinance within 90 days. The order also provided that upon failure of the municipality to act the court would take other steps to implement its opinion.
The Township thereafter amended the zoning ordinance a second time and reclassified plaintiffs' property into an existing zoning category, "restricted commercial" (RC). Permitted uses included one- and two-family houses and certain commercial purposes (nursery, funeral home, commercial school, bowling alley, small animal hospital, theatre, antique shop, restaurant and automobile sales room, provided no new or used vehicles be stored or stand outside). The trial court held another hearing to consider the Township's latest action. After completion of the trial, on October 7, 1976, but before the trial court issued its opinion, the Township again amended the ordinance to broaden *438 the commercial uses to include retail stores of 5,000 square feet or less.
The trial court invalidated the ordinance. It declared that the most recent additional amendment, having been made more than 90 days after its December 15, 1975 order, should not be considered.
In its letter opinion dated February 23, 1977, the trial court wrote:
Since the ordinance was amended prior to my decision, normally I would be obliged to consider its validity as it now exists, rather than its form at the time of hearing. Tidewater Oil Co. v. Mayor and Council of Carteret, 44 N.J. 338 (1965); Roselle v. Moonachie, 48 N.J. Super. 17 (A.D. 1957). However, the amendment was made far beyond the 90-day period fixed in my Order. The cases establishing the rule that a zoning ordinance is considered as of the time of decision, do not contemplate enactment by a municipality of an ordinance after the time limited by court order. Township was under an affirmative obligation to act within 90 days. Its dilatory action was in open violation of a court order. The time limit was fixed because the litigation had already been unduly protracted. It is unjust for Township by such conduct to further extend the litigation, and I do not think that judicial respect for municipal government requires it. I shall, therefore not consider this amendment, except as indicated hereafter.
The trial court, implicitly recognizing that it should have originally granted the variance, ordered the Township to rezone the land for multiple dwelling use within 120 days.
The Township appealed and plaintiffs cross-appealed. The Appellate Division held that plaintiffs had been entitled to a variance, but that the trial court erred in refusing to consider the last modification to the zoning amendment, because the variance was "controlled by the ordinance in effect at the time of the decision and not by the ordinance which was operative when... the variance was sought." It remanded the case to the Board of Adjustment for reconsideration of the variance application. One judge dissented on the ground that the variance sought permission for a use outside of that permitted *439 by the ordinance and the propriety of the variance was not directly affected by the amendment. He agreed that plaintiffs were entitled to a variance and concluded that the ordinance amendment was immaterial on the question of whether the variance was improperly denied.
Plaintiffs appealed on the basis of the dissent in the Appellate Division. R. 2:2-1(a)(2). Defendant did not seek a review. R. 2:3-4(b). Accordingly, we shall only consider the issues raised by the dissent, Gilborges v. Wallace, 78 N.J. 342, 349 (1978), and we may assume that plaintiffs were entitled to a variance under N.J.S.A. 40:55-39(d), now N.J.S.A. 40:55D-70(d). Special reasons had been shown justifying construction of a garden apartment. Since there was no substantial detriment to the public good and no substantial impairment of the intent and purpose of the zone plan and zoning ordinance, the "negative criteria" of the variance statute were also satisfied.
The physical facts were uncontroverted in large part. The Township is a quadrilateral with corners approximately at the north, south, east and west. Pompton Avenue (Route 23) runs from the southern to the northern corner and divides the municipality into two triangles. Pompton Avenue is a major traffic artery and development along its length has been haphazard. There are commercial establishments, multi-family dwellings, places of entertainment, a nursing home, one-family houses, garden centers, a veterinarian establishment and many other varied uses. It is essentially a "hodgepodge highway strip development...." Wilson v. Mountainside, 42 N.J. 426, 450 (1964).
The premises in question are located in the northerly part of Route 23 at its juncture with West Lindsley Road. It consists of 5.75 acres with a frontage on Route 23 of 1073 feet and on West Lindsley Road of 778 feet. A 40-foot easement of the Jersey City Water Supply Commission cuts across the tract. West Lindsley Road runs northwesterly from Route 23 at about a 45-degree angle. Immediately south of the property is a farm produce stand. Across Route 23 to the east is a garden apartment *440 and south of that is a nursing home. West of the tract are some one-family homes. To the immediate north of the premises is vacant land zoned for light industrial use.
The narrow legal issue presented is whether the trial court erred when it refused to consider an amendment to the zoning ordinance adopted beyond the 90-day period provided in its order of December 15, 1975 and after conclusion of the fourth trial addressed to the third zoning amendment, but before the trial court's decision. We conclude that it did not err.
It is a well-established principle that an appellate court on direct review will apply the statute in effect at the time of its decision, at least when the legislature intended that its modification be retroactive to pending cases. The purpose of the principle is to effectuate the current policy declared by the legislative body  a policy which presumably is in the public interest. By applying the presently effective statute, a court does not undercut the legislative intent. Moreover, when a facial attack on a statute is involved, or an injunction is sought against future violations of a statute, the time of decision rule is necessary to avoid rendering an advisory opinion on a moot question.
An early pronouncement of the principle is found in Chief Justice Marshall's opinion in United States v. Schooner Peggy, 1 Cranch 103, 2 L.Ed. 49 (1801). In that case, the schooner Peggy (a French ship) had been captured by an American vessel, and condemnation proceedings had been instituted against the ship. The Circuit Court found that the Peggy had been captured on the high seas and was a lawful prize. While the case was pending before the Supreme Court, the United States and France signed a treaty which provided that both countries would return captured property. The Court ordered the restoration of the Peggy to France according to the terms of the treaty. Chief Justice Marshall explained why the law at the time of decision would apply:

*441 It is in the general true that the province of an appellate court is only to inquire whether a judgment when rendered was erroneous or not. But if, subsequent to the judgment, and before the decision of the appellate court, a law intervenes and positively changes the rule which governs, the law must be obeyed, or its obligation denied. If the law be constitutional, and of that no doubt in the present case has been expressed, I know of no court which can contest its obligation. It is true that in mere private cases between individuals, a court will and ought to struggle hard against a construction which will, by a retrospective operation, affect the rights of parties, but in great national concerns, where individual rights, acquired by war, are sacrificed for national purposes, the contract making the sacrifice ought always to receive a construction conforming to its manifest import; and if the nation has given up the vested rights of its citizens, it is not for the court, but for the government, to consider whether it be a case proper for compensation. In such a case the court must decide according to existing laws, and if it be necessary to set aside a judgment, rightful when rendered, but which cannot be affirmed but in violation of law, the judgment must be set aside. [Id. at 110, 2 L.Ed. at 51]
See also Ziffrin, Inc. v. United States, 318 U.S. 73, 78, 63 S.Ct. 465, 469, 87 L.Ed. 621, 625-626 (1942) (an administrative agency must apply the law at the time of its decision "[o]therwise the administrative body would issue orders contrary to the existing legislation").
The same rule has been applied by the courts of this State. In S & L Associates, Inc. v. Washington Tp., 35 N.J. 224, 226-227 (1961), the Appellate Division had found a zoning ordinance invalid because of the self-interest of voting members of the municipal planning board. However, we did not consider that ordinance because a new one had been passed without the participation of interested board members. See also Little Ferry Borough v. Bergen Cty. Sewer Auth., 9 N.J. 536, 547 (1952) (while it may have been unclear whether condemnation of public lands was authorized under the relevant statute, such authority was expressly given by a later amendment which governed the disposition of the case); Westinghouse Electric Corp. v. United Electrical Workers Local 410, 139 N.J. Eq. 97, 105-107 (E. & A. 1946) (despite lower court holding that a *442 section of the Anti-Injunction Act was unconstitutional, Court of Errors and Appeals considered and declared constitutional the Act as amended in the interim).
The principle has been expressly followed with respect to municipal zoning ordinances. See Hohl v. Readington Tp., 37 N.J. 271, 279 (1962) ("[t]he zoning ordinance in effect at the time the case is ultimately decided is controlling"); Socony-Vacuum Oil Co. v. Mt. Holly Tp., 135 N.J.L. 112, 117 (Sup.Ct. 1947) ("[i]t is the status of the [zoning ordinance] prevailing at the time of the decision by the court that is controlling"). Zoning generally must further the public health, safety, morals or welfare. See So. Burlington Cty. NAACP v. Mt. Laurel Tp., 67 N.J. 151, 175 (1975), cert. den. 423 U.S. 808, 96 S.Ct. 18, 46 L.Ed.2d 28 (1975); Morris v. Postma, 41 N.J. 354 (1964). Since an amendment to or enactment of a zoning ordinance presumably advances those goals, application of the ordinance at the time of decision serves a beneficial purpose.
However, the principle is not inexorable. A municipality may not automatically have the benefit of the time of decision principle by adopting a new zoning ordinance or amendment thereto. Where a court has set a reasonable time limitation within which a municipality must act and that condition has not been met, a municipality may not simply ignore a court order and interfere with the judicial process. In the absence of sufficient reasons, no effect on the pending court matter should be given to the municipal action.
A comparable approach was taken in First National Bank of Skokie v. Skokie Village, 85 Ill. App.2d 326, 229 N.E.2d 378 (Ill. App.Ct. 1967). Plaintiffs sought approval of a plan for multi-apartment use of property which was zoned for single and two-family purposes. Despite the approval at four governmental levels, the Village Board of Trustees denied the request. Plaintiffs sued for injunctive relief. The trial court granted plaintiffs' request, and as part of its relief enjoined the town from rezoning the property to another classification. The Village, *443 however, amended the ordinance and rezoned the land. The Appellate Court recognized the time of decision rule but refused to consider the amended ordinance:
While we do not decide that plaintiffs acquired any vested rights to their proposed use merely by filing suit to have the old ordinance declared invalid, we do find the Village was subject to the injunction below restraining interference with the particular use granted plaintiffs by the decree. To hold otherwise would severely weaken the judicial process when it is properly invoked to provide equitable remedy in zoning cases. By repeated eleventh-hour amendments to the zoning ordinance (or thirteenth-hour, as in this case), a resourceful village board could prolong litigation endlessly and utterly deprive an equity petitioner of any meaningful moment at the Chancellor's ear. [Id. at 336-337, 229 N.E.2d at 384]
The circumstances here illustrate why this exception to the time of decision rule is even more compelling. More than eight years ago, plaintiffs filed their application for the variance which the Board of Adjustment subsequently recommended. There followed over seven years of litigation in the courts including four trials in which three different zoning schemes applicable to the property in question were considered.
After the trial court struck down the municipality's original ordinance permitting only one-family houses and directed the municipality to adopt an "appropriate" zoning amendment, the municipality then rezoned to permit only certain types of office buildings and research laboratories. Following the next hearing the trial court held that the evidence did not justify exclusion of residential usage and that the amended ordinance was unconstitutional. It directed the municipality to "consider the use of the premises for all purposes, including single and multiple dwellings of all kinds in its determination as to how to rezone." It also ordered that the municipality act within 90 days. The municipality's response was to place the land in a restricted commercial zone, a category previously described in the zoning ordinance. This zone permitted one- and two-family houses and some limited commercial purposes. It was after the trial on the *444 efficacy of this amendment and pending announcement of its decision that the municipality amended the restricted commercial zone by including retail stores not in excess of 5,000 square feet.
After this last amendment, the trial court stated that the case had "been tried to the point of exhaustion." The Township had changed the zoning on the land three times, each amendment tailored to permit the landowner the most restrictive use of the land which the Township felt would satisfy the court. It commented that its prior opinions had eliminated one-family dwellings on 15,000 square-foot lots, office buildings on three-acre tracts, and the restricted commercial zone (which included again one-family homes). The court went on to state:
What we have here is indeed a rare case. Township has immobilized landowner's property since at least 1973. It has forced upon landowner expensive litigation by repeated improper zoning to the point where landowner is no longer willing to bear the cost of further proceedings. The fact that Township added provision for small stores to the R-C classification is at least some indication that it felt R-C zoning inadequate. This is the kind of situation where a court should have the right to call a halt and bring the litigation to conclusion by concrete direct action.
No one can reasonably question the trial court's action in making available an opportunity to the municipality to revise its ordinance. In remarking on the propriety of a court affording a municipality such an opportunity, Justice Hall stated, "There is certainly nothing here that could reasonably suggest an inappropriate judicial role." The Judicial Role in Land-Use Regulation, 100 N.J.L.J. 505, 515 (1977). The municipality does not question the reasonableness of the 90-day limitation within which it was to act. Moreover, the municipality never requested the trial court to modify its order permitting a tardy amendment. It has not demonstrated or suggested any reason or justification for its delay of approximately a year before again amending the ordinance after the fourth trial was completed.
*445 As we previously observed, there is no denial that plaintiffs had been entitled to a variance. They are still entitled to a variance. The trial court's finding that the RC zone was identical to the initial zone category in that neither permitted a feasible use of the property is supported by the record. Therefore, since plaintiffs were entitled to a variance under the original zone, it follows that plaintiffs' entitlement to a variance continues.
It is significant that the negative criteria justifying a variance had been and continue to be satisfied. Thus, construction of the garden apartment would neither cause substantial detriment to the public good nor substantially impair the intent and purpose of the zone plan and zoning ordinance. N.J.S.A. 40:55D-70. Under these circumstances the primary purpose of the time of decision rule, namely the public policy of furthering the general welfare exemplified by current zoning, will not be adversely affected.
In view of the extended proceedings, the unquestioned propriety of the trial court's 90-day restriction, and the property owners' satisfaction of the requirements for a variance, the equities warrant and judicial integrity justifies the inapplicability of the time of decision rule. Cf. Oakwood at Madison v. Madison Tp., 72 N.J. 481, 549-550 (1977). The Township has had more than enough opportunity to amend its ordinance.
The judgment of the Appellate Division is modified by providing that the Township of Cedar Grove grant plaintiffs a variance.
For modification  Chief Justice WILENTZ and Justices PASHMAN, CLIFFORD, SCHREIBER, HANDLER and POLLOCK  6.
For affirmance  Justice SULLIVAN  1.
