This is an appeal from a final decree of the Court of Common Pleas of Delaware County denying a prospective buyer’s request for specific performance of a contract for the sale of land. We reverse.
On April 26, 1983, appellant Peter Messina agreed to purchase a portion of a tract of property owned by appel-lees Edward Silberstein and David Frampton. Messina gave the owners a $500.00 deposit. The balance of the purchase price was to be paid “at such time as the parties determine the square feet involved, but no later than May 2, 1983.” The agreement also contained a clause specifying that “time is of the essence”. The trial court found that neither party determined the square footage by May 2, 1983. Silberstein informed Messina that he and Frampton were having trouble getting good title and the buyer did not tender the balance of the consideration on May 2nd. Messi-na then calculated the square footage and tendered the balance on May 27, 1983 to attorney Edward Harkin, the drafter of the original sales agreement. Silberstein did not take possession of the funds nor did he indicate to Mr. Harkin that he considered the agreement void. The parties continued to discuss the proposed sale for several months until the sellers refused to perform. Messina brought an action in equity, seeking specific performance. The trial court refused the requested relief. The court noted that Colywyn Borough Code § 133-2 forbids a land-owner from subdividing his land without the borough’s prior approval. The court stated that because no such approval was ever given, performance of the contract would be illegal and a court in equity may not order performance of an illegal bargain.
Appellant presents four issues for our review: (1) whether the attorney who drafted the agreement was the sellers’ agent; (2) whether the trial court should have ruled extrin*590sic evidence of the sellers’ intent inadmissible because of the parol evidence rule; (3) whether the “time is of the essence” clause was waived; and (4) whether the court should have ordered specific performance even though the borough had not approved the subdivision. For the reasons identified in the following discussion, we need only consider the last two of these issues.
A court may order specific performance of a contract to sell land when the agreement is complete and certain, where no adequate remedy at law exists and the vendor violates the terms of the sales agreement. Rusiski v. Pribonic, 326 Pa.Super. 545, 554, 474 A.2d 624, 629 (1984) rev’d. on other grounds, 511 Pa. 383, 515 A.2d 507 (1986). The trial court found that the agreement was complete and certain and susceptible to the remedy of specific performance.
However, the court ruled that the bargain violated the Colwyn Borough Code making it illegal and unenforceable. See Contractor Industries v. Zerr, 241 Pa.Super. 92, 97, 359 A.2d 803, 805 (1976).
The pertinent provision of the Code provides:
It shall be unlawful for the owner of any land in the Borough to subdivide the same into two (2) or more lots or parcels unless and until a plan thereof shall have been prepared by a registered professional engineer or survey- or, submitted to and approved in writing.
The contract between Messina and the sellers failed to specify which party should prepare and submit the plan. However, the Code provision does not state that the purchase of such a subdivided parcel is void or illegal. The provision restricts the owner of the land only. Therefore, it logically follows that it is the owner’s responsibility to obtain the requisite approval. This is also the more practical result. Prior to settlement, the owner is in possession of the tract. He does not need the buyer’s cooperation to bring a surveyor onto the property to draw up a plan. But, the buyer could not bring a surveyor or engineer onto the seller’s property without permission. The owner is in the *591better position to secure compliance with the ordinance. Furthermore, the owner has an interest in the entire tract to be subdivided while the buyer’s interest is limited to the one parcel he plans to purchase. If an owner were to subdivide his land into twenty-four parcels and sell them to twenty-four different buyers, only the seller could possibly prepare a subdivision plan. No single buyer would be in a position to do so. All of these considerations lead to the conclusion that unless the contract of sale provides otherwise, it is the seller’s obligation to comply with the Code section in question.
The instant sale is not necessarily illegal. It is only unlawful if the seller does not comply with the Borough Code. We will not allow a seller to avoid an otherwise legal transaction because his own failure to act is unlawful. O’Brien v. O’Brien Steel Construction Co., 440 Pa. 375, 380, 271 A.2d 254, 256 (1970). See also First National Bank v. Baer, 277 Pa. 184, 189-90, 120 A. 815, 817 (1923); Fitzpatrick v. Shay, 314 Pa.Super. 450, 458, 461 A.2d 243, 247 (1983); Shafer v. A.I.T.S., 285 Pa.Super. 490, 494, 428 A.2d 152, 154 (1981).
Of course, we will not order the parties to complete a transaction in violation of the law. However, we are confident that the trial court will be able to tailor an appropriate remedy. A court of equity may order specific performance pending approval of the subdivision plan. See Cochrane v. Szpakowski, 355 Pa. 357, 363, 49 A.2d 692, 695 (1946).
The trial court stated that the agreement provided that “time is of the essence” and it was impossible to get subdivision approval by May 2nd. Therefore, the court held that the agreement was unenforceable. However, because the sellers failed to even apply for approval, it is impossible to determine whether the borough would have immediately granted the application. We will not allow a party’s own nonfeasance to defeat his contractual obligations.
The sellers also argue that when a contract specifies “time is of the essence”, the buyer must tender within the *592requisite time period or a court will refuse to grant him specific performance. The trial court found that Messina did not tender on May 2, 1983, and therefore is not entitled to specific performance. The court held that “the fact that the defendants were not in a position to convey good title on May 2, 1983 is irrelevant to the issue at hand.” The court based its conclusion on our Supreme Court’s decision in Phaff v. Gerner, 451 Pa. 146, 303 A.2d 826 (1973). However, the trial court has misinterpreted the Phaff Court’s holding.
In Phaff a buyer failed to tender within the time specified in the “time is of the essence” clause. The buyer later sought specific performance. He claimed that he did not tender because the seller could not convey good title at that time. However, the seller denied this allegation. Id,., 451 Pa. at 148, 303 A.2d at 828. The Phaff Court held that the agreement could not be enforced in equity because the buyer did not tender and the seller claimed that he would have been able to convey good title. Id., 451 Pa. at 153, 303 A.2d at 836.
However, in Williams v. Barbaretta, 359 Pa. 488, 59 A.2d 161 (1948), the Court held that the law will not require the doing of a futile act. In Williams, the contract at issue also contained a “time is of the essence” clause with a specific settlement date. Prior to the date, the sellers informed the buyers that they would be unable to move by the agreed upon time. The buyers did not tender within the contractually allotted time and the sellers later attempted to break the agreement. The Court granted specific performance for the buyers even though they had not tendered by the specified date. Id., 359 Pa.Superior Ct. at 490-91, 59 A.2d at 162-63. The Court stated that the buyers’ usual obligation to tender was excused because it would have been a useless act since the sellers were not ready to settle. Id., 359 Pa.Superior Ct. at 491-92, 59 A.2d at 163. See also Detwiter v. Capone, 357 Pa. 495, 504, 55 A.2d 380, 386 (1947); Phillips v. Tetzner, 357 Pa. 43, 47, 53 A.2d 129, 132 (1947).
*593In Williams, it was factually uncontradicted that the sellers were not ready for settlement by the date in question. In Phaff, the sellers denied that they would not have been ready for settlement. Therefore, a court may grant specific performance if a contract specifies that “time is of the essence” even if the buyer fails to tender where it is uncontradicted that any such tender would have been a futile act. Specific performance is foreclosed as a remedy if two elements are present: (1) the buyer has not tendered by the specified date; and (2) the seller has effectively denied that such tender would have been futile. In the instant case, the sellers have not denied that they were unable to convey good title on May 2, 1983. Tender by the buyer would have been futile. Both parties realized that good title could not be exchanged at that time. Therefore, we may not allow the outcome of this case to hinge upon the buyer’s failure to tender. That failure is not an obstacle to Messina’s request for specific performance.
Accordingly, we reverse and remand for the entrance of a decree consistent with the foregoing. Jurisdiction Relinquished.
ROWLEY, J., noted dissent.