This is an appeal by the defendant Madison Inland Wetlands Agency from the judgment of the trial court sustaining the plaintiff’s appeal and reversing the agency’s denial of the plaintiff’s application for a permit to conduct a regulated activity.
The defendant claims that the court erred in concluding that the agency lacked subject matter jurisdiction and that it exceeded its powers of review when it concluded, sua sponte, that a cease and desist order was void and that the agency had not placed on the record the reasons for its decision.
The plaintiff desired to create a farm pond of less than three acres and a nursery where he planned to grow evergreen trees on a parcel of land in Madison consisting of approximately twenty-seven acres, part of which had been designated as wetlands. On or about October 13, 1986, before purchasing the land he went to the office of the defendant agency to inquire about establishing a nursery and farm pond. His plan was to *442spread the spoils of his pond construction on the adjacent area. He was informed that a farm pond and nursery were permitted uses as of right in a wetland. The plaintiff then entered into an agreement with the owner of the parcel to purchase it, and a bond for deed was signed. The plaintiff began digging a pond and clearing the area for a nursery.
On December 24,1986, an inspector for the defendant visited the property and discovered that a crossing of the watercourse on the property was under construction. A letter was sent to the plaintiff by certified mail on stationery of the defendant but signed by the zoning enforcement officer. The plaintiff was informed by the letter that in the opinion of the agency the crossing was beyond the scope of the “as of right” operations and uses delineated in the agency regulations, that there was considerable turbidity of the pond of an abutting owner, and that the entire project was having or would have significant impact or major effect on the wetlands. The plaintiff was ordered to cease and desist from any further operations on the property until he had appeared before the agency at its regular meeting on January 5, 1987, to show cause why the order should not remain in effect. The letter was dated December 27,1986, but mailed on December 24,1986, which was twelve days before the regular meeting date. General Statutes § 22a-44 (a)1 requires a show cause *443hearing within ten days of the issuance of an order to cease any activity, and both § 22a-44 (a) and § 8.22 of the agency regulations require a hearing within ten days of an order to correct a condition.
At the hearing on January 5,1987, the agency agreed that the plaintiff was proceeding “as of right.” A task force was appointed to work with the plaintiff, and the agency voted that the plaintiff provide it with a “courtesy application”3 to conduct a regulated activity outlining his intended activities; which were to be worked out with the task force.
Section 22a-44 (a) requires that within ten days of the completion of the hearing, the agency send notice by certified mail that the original order remains in *444effect or that it has been revised or withdrawn. The record shows that on January 7, 1987, the two task force members believed that the cease and desist order should remain in effect after they had inspected the property. The record also shows that notice, signed by one of them, was sent by certified mail to the plaintiff.
On February 2,1987, the agency reviewed the report of the task force and considered the matter again. The agency voted that the cease and desist order stay in effect until such time as it received an application and full site development plan, except that the plaintiff was to put in a silt fence and hay bales downstream from a culvert.
On February 10, 1987, the plaintiff filed, on a form provided by the defendant, an application to conduct a regulated activity in a designated wetlands area. He wrote the word “courtesy” on the application, and he submitted with it a notice that it was submitted to the agency as a courtesy because the proposed activity was permitted “as of right” under General Statutes § 22a-40 (a) (1), and because three representatives of the defendant had informed him that the proposed activity was permitted “as of right.” The application recited that it was the plaintiff’s purpose to “bring back to farm conditions similar to the harvested fields approximately thirty years ago, pond nursery operations and uses as defined as Section 2.1.1.”
On February 17, 1987, at a special meeting of the agency, the plaintiff filed an amendment to the application entitled Schedule A which reads as follows:
“ — create farm pond of less than three (3) acres and deposit excavated spoil from pond area to raise levels of adjacent fields by up to two (2) feet to enable planting and maintenance of nursery stock:
“ — rebuild three (3) existing stream crossings as indicated on site plan entitled ‘proposed improvements,’ by U.S.D.A., David Lord CT-NH87-1.
*445“ — relocate secondary water course as indicated on site plan noted above.
“ — clear cut fill and grade portions of uplands and wetlands as per plans submitted — noted above.”
A special public hearing was scheduled for March 9, 1987. At the hearing, the plaintiff again stated that his use was exempt from regulation. The agency asserted jurisdiction and voted that the application “with maps as submitted and the proposal as orally presented be denied with prejudice as having been nonpersuasive and incomplete with respect to engineering details and exact planned work.”
On February 10,1987, General Statutes § 22a-40 provided in part as follows: “permitted operations and uses, (a) The following operations and uses shall be permitted in wetlands and watercourses, as of right: (1) Grazing, farming, nurseries, gardening and harvesting of crops and farm ponds of three acres or less >>
Section 22a-40 was amended by Public Acts 1987, No. 87-533, which took effect on July 1,1987. After July 1, 1987, the relevant portion of § 22a-40 was as follows: “(a) The following operations and uses shall be permitted in wetlands and watercourses, as of right: (1) Grazing, farming, nurseries, gardening and harvesting of crops and farm ponds of three acres or less essential to the farming operations. The provisions of this subdivision shall not be construed to include road construction or the erection of buildings not directly related to the farming operation, relocation of watercourses with continual flow, filling or reclamation of wetlands or watercourses with continual flow, clear cutting of timber except for the expansion of agricultural crop land, the mining of top soil, peat, sand, gravel or similar material from wetlands or watercourses for the purpose of sale.”
*446General Statutes § 22a-42 (a) as it was before July 1, 1987, declared it to be the public policy of the state to encourage municipalities to regulate their wetlands and watercourses in order to carry out the purposes of the Inland Wetlands and Watercourses Act. Public Acts 1987, No. 87-533, amended § 22a-42 (a) to require rather than encourage municipal regulation of wetlands and watercourses.
The town of Madison has enacted wetlands and watercourses regulations by ordinance. On February 10, 1987, § 2 of the regulations provided, in part, as follows: “Section 2. Permitted Operations and Uses. 2.1 The following operations and uses shall be permitted in Inland Wetlands and Watercourses as of right; 2.1.1 Grazing, farming, nurseries, gardening, and harvesting of crops and farm ponds of three acres or less.”
The record does not reveal whether the Madison regulations have been amended since July 1, 1987.
The plaintiff appealed to the Superior Court, which remanded the case, at the request of the parties, so that the agency might consider it in light of the amendments to the statutes. The parties reported that the agency did not reconsider the matter but insisted that the plaintiff file a new application. Thereafter, the trial court reversed the decision of the agency.
The trial court concluded that thé cease and desist order was issued on December 24, 1986, when it was deposited in the mail. A hearing was scheduled for and held on January 5, 1987, some twelve days later. Because both General Statutes § 22a-44 (a) and § 8.2 of the agency regulations require a hearing within ten days of the issuance of the order, and because the hearing occurred more than ten days after December 24, 1986, the court concluded that the cease and desist *447order was void ab initio and that the agency had no jurisdiction to conduct a hearing on January 5, 1987, and subsequent dates.
The court also observed that under General Statutes § 22a-40 (a) (1) and § 2.1.1 of the regulations, nurseries and farm ponds of three acres or less are permitted operations and uses of right in wetlands and watercourses, that the plaintiff had never agreed that the agency had jurisdiction over his use of his land for those purposes, and that his courtesy application was not a waiver of his claim. The court observed further that even if the plaintiffs operations were a regulated activity, General Statutes § 22a-42a (d) and § 6.6 of the regulations require the agency to state the reasons for its decision on the record and that no reasons were placed on the record. It observed that the parties had agreed that the amendments to § 22a-40 (a) (1), which were effective on July 1,1987, did not apply to this matter. Although not spelled out, a fair reading of the court’s conclusions is that the plaintiff’s activities in attempting to create a nursery and a farm pond of less than three acres were exempt from regulation. The court thereupon reversed the decision of the agency.
On January 6,1988, the defendant moved for clarification and articulation, seeking to discover what affirmative relief had been granted to the plaintiff and what further course of conduct was required of the defendant. The court responded that the motion was premature, no appeal having been taken at that time, and that the judgment held that the agency lacked subject matter jurisdiction for reasons spelled out in the memorandum of decision.
Whether the provision in General Statutes § 22a-44 (a) that within ten days of the issuance of a cease and desist order the agency shall hold a hearing is mandatory or merely directory depends upon *448whether the provision “relates to matter of substance or to matter of convenience.” Donohue v. Zoning Board of Appeals, 155 Conn. 550, 554, 235 A.2d 643 (1967). Although the use of the word “shall” is significant, it does not automatically create a mandatory duty because statutes must be viewed as a whole in order to ascertain the legislative intent. Tramantano v. Dilieto, 192 Conn. 426, 433-34, 472 A.2d 768 (1984); In re Adrien C., 9 Conn. App. 506, 510, 519 A.2d 1241, cert. denied, 203 Conn. 802, 522 A.2d 292 (1987).
While it is undoubtedly true that under the statute it is mandatory that the defendant hold a hearing on the merits after issuing a cease and desist order, it does not necessarily follow that the time period is also mandatory. See Winslow v. Zoning Board, 143 Conn. 381, 387, 122 A.2d 789 (1956).
It is well settled that one of the more reliable guides in determining whether a statutory provision is directory or mandatory is whether the provision is accompanied by language that expressly invalidates any action taken after noncompliance with the provision. See Chesson v. Zoning Commission, 157 Conn. 520, 527, 254 A.2d 864 (1969); Donohue v. Zoning Board of Appeals, supra; Winslow v. Zoning Board, supra, 384; Arrieu v. Litchfield, 17 Conn. App. 320, 324, 552 A.2d 445 (1989); see also Fidelity Trust Co. v. BVD Associates, 196 Conn. 270, 278, 492 A.2d 180 (1985).
There is nothing in the language of General Statutes § 22a-44 (a) that suggests that, if the agency does not hold a hearing within ten days of the issuance of the order, all of its actions taken thereafter will be void. We note also that the agency may issue a cease and desist order whenever it finds a violation of the Inland Wetlands and Watercourses Act or of the regulations. Since the act allows the agency the discretion to issue cease and desist orders whenever it finds such a viola*449tion, the agency could immediately reassert its jurisdiction by issuing a cease and desist order after ten days. Thus, it makes little sense to conclude that the legislature intended the ten day period to be mandatory. Viewed in its proper context, the provision is designed not to set an inflexible time limit, but to secure a prompt and systematic dispatch of the proceedings relating to the cease and desist order. Donohue v. Zoning Board of Appeals, supra; In re Adrien C., supra. Hence, the provision relates to procedure and is merely directory. Consequently, the fact that the agency sent out the notice of the hearing two days early was not a defect fatal to its jurisdiction.
On the merits of this case, we do not agree that the defendant did not state the reasons for its decision on the record as is required by General Statutes § 22a-42a (d) and § 6.6 of its regulations. At the conclusion of the meeting of March 9, 1987, there was a motion made and seconded that the application as submitted with maps and the proposal as orally presented be denied with prejudice “as having been nonpersua-sive and incomplete with respect to engineering details and exact planned work.” This motion carried unanimously. The record contains a copy of a letter containing that information dated March 16, 1987, and sent to the plaintiff by certified mail.
The trial court considered that the application was to establish a nursery and a farm pond on the property. Because of the agreement that General Statutes § 22a-40 (a) (1) as amended in 1987 did not apply, the court apparently did not consider the effect of the amendment made by the plaintiff to his application on February 17, 1987. It seems clear that the trial court concluded that the activity proposed by the plaintiff was not a regulated activity for which a permit was required because it simply reversed the defendant’s denial of the permit without ordering the issuance of the permit.
*450The parties incorrectly agreed that this matter was not controlled by General Statutes § 22a-40 (a) (1) as amended. The regulation in effect at the time of the decision of a court is controlling, as opposed to that in effect when the proceedings were instituted or when the administrative agency entered its decision upon the application. McCallum v. Inland Wetlands Commission, 196 Conn. 218, 223, 492 A.2d 508 (1985); Hegyi v. Planning & Zoning Commission, 14 Conn. App. 365, 369, 540 A.2d 1068 (1988).
• The record of the various hearings before the agency demonstrates that the agency was concerned that the plaintiff was planning to change watercourses, to move earth in order to level parts of the property and to raise the level of the ground in order to plant his nursery stock. Whether the plaintiff is permitted to carry on his activities as he has apparently planned to do must be determined under General Statutes § 22a-40 (a) as amended.
It is apparent from the amended application that the plaintiff is reclaiming wetlands, which requires a permit, and that the plan includes relocation of a secondary watercourse, which may also require a permit, depending upon whether it is a watercourse with continual flow.
There is error, the judgment is set aside and the case is remanded with direction to dismiss the plaintiffs appeal.
In this opinion the other judges concurred.
General Statutes § 22a-44 (a) provides: “penalty, court orders. (a) If the inland wetlands agency or its duly authorized agent finds that any person is conducting or maintaining any activity, facility or condition which is in violation of sections 22a-36 to 22a-45, inclusive, or of the regulations of the inland wetlands agency, the agency or its duly authorized agent may issue a written order by certified mail, to such person conducting such activity or maintaining such facility or condition to cease immediately such activity or to correct such facility or condition. Within ten days of such issuance of such order the agency shall hold a hearing to provide the person an opportunity to be heard and show cause why the order should not remain in effect. The agency shall consider the facts presented at the hearing and within ten days of the completion of the hearing notify the *443person by certified mail that the original order remains in effect, that a revised order is in effect, or that the order has been withdrawn. The original order shall be effective upon issuance and shall remain in effect until the agency affirms, revises or withdraws the order. The issuance of an order pursuant to this section shall not delay or bar an action pursuant to subsection (b) of this section. The commissioner may issue orders pursuant to sections 22a-6 to 22a-7, inclusive, concerning an activity, facility or condition which is in violation of said sections 22a-36 to 22a-45, inclusive, if the municipality in which such activity, facility or condition is located has failed to enforce its inland wetlands regulations.”
Section 8.2 of the Wetlands and Watercourses Regulations of the town of Madison provides: “Any person who commits, takes part in, or assists in any violation of any provision of these Regulations shall be subject to the penalties provided in section 22a-44 of the General Statutes, and to such other penalties as the law may provide. If the Agency determines that any person is engaging in any regulated activity without a proper permit, or is exceeding the condition or limitations placed on his permit, or the scope of work as set forth in the application, or has obtained a permit through deception or through inaccurate information or is engaging in any other violation of these Regulations or of Sections 22a-36 through 22a-45 of the General Statutes, as amended, it shall:
“A. Issue a written order by certified mail, to such person to correct such violation. Within ten (10) days of the issuance of such order the Agency shall hold a hearing to provide the person an opportunity to be heard and show cause why the order should not remain in effect . . . .”
One of the members of the defendant agency first used the phrase “courtesy application” at the meeting of January 5, 1987.