
583 N.W.2d 293 (1998)
MANCO OF FAIRMONT, INC., petitioner, Appellant,
v.
TOWN BOARD OF ROCK DELL TOWNSHIP, Respondent.
No. CX-98-610.
Court of Appeals of Minnesota.
August 25, 1998.
Review Denied October 20, 1998.
*294 Gary G. Wollschlager, Wollschlager, Tow & Associates Law Firm, P.A., Fairmont, for appellant.
Peter B. Tiede, C. Todd Koebele, Murnane, Conlin, White & Brandt, P.A., St. Paul, for respondent.
Considered and decided by CRIPPEN, P.J., AMUNDSON and SCHULTZ, JJ.

OPINION
HAROLD W. SCHULTZ, Judge.[*]
The district court denied appellant's petitions for mandamus because it concluded that respondent had complied with Minn.Stat. § 15.99.

FACTS
On September 2, 1997, appellant Manco of Fairmont applied for a conditional use permit (CUP) from respondent Town Board of Rock Dell Township (the township). Manco sought to increase its pig feedlot from 2,000 to 4,000 animal units. The township considered the application on September 24, 1997. The township was required under Minn.Stat. § 15.99, subd. 2 (1996), to render a decision or seek a continuance on the CUP within 60 days. On October 24, 1997, the township sent Manco a letter notifying it that it was seeking a 60-day extension. Extensions are permitted under Minn.Stat. § 15.99, subd. 3(f) (1996).
The township ultimately denied the CUP on January 7, 1998. Its reasons were due to zoning, a previous grant of a CUP to allow Manco to expand from 1,000 to 2,000 pigs, neighbors' concerns, Manco's nonconformity regarding waste, and concern over the health and welfare of the area.
On or around March 6, 1998, Manco petitioned the district court for a peremptory or an alternative writ of mandamus under Minn. Stat. § 15.99, requiring the township to approve its CUP. The township was not provided notice of the hearing nor did it participate; it claims it was unaware of the proceeding until it received the district court's denial of Manco's writ. Manco claims that it lost a contract with Hormel worth $920,000 because of the township's failure to issue the CUP. The district court denied Manco's petitions. Manco now appeals.

ISSUE
Did the district court err in denying appellant's writ of mandamus?

ANALYSIS
Where we review a court's discretion in granting or denying a writ of mandamus and when the issuance of a writ turns on purely legal determinations, this court need not defer to the district court's decision. Castor v. City of Minneapolis, 429 N.W.2d 244, 245 (Minn.1988); Haen v. Renville County Bd. of Comm'rs, 495 N.W.2d 466, 469 (Minn. App.1993), review denied (Minn. Mar. 30, 1993).

A. Reason for Extension
This case revolves around compliance with the following statutory language:
[A]n agency must approve or deny within 60 days a written request relating to zoning * * * or other governmental approval of an action. Failure * * * to deny a request within 60 days is approval of the request. If an agency denies the request, it must state in writing the reasons for the *295 denial at the time that it denies the request.
Minn.Stat. § 15.99, subd. 2 (1996).
An agency may extend the time limit in subdivision 2 before the end of the initial 60-day period by providing written notice of the extension to the applicant. The notification must state the reasons for the extension and its anticipated length, which may not exceed 60 days unless approved by the applicant.
Id., subd. 3(f) (1996).
On October 24, 1997, before 60 days had passed from the consideration of Manco's original request, the township sent a letter to Manco that stated:
Rock Dell Township wishes to exercise its option to take an additional 60 days to make a decision on the special use permit application for which a public hearing was held on 9/24/97 at the Rock Dell Town Hall. Please consider this letter your official notification. If you have any questions or comments, please contact me at XXX-XXX-XXXX.
Manco argues that the township did not comply with subdivision 3(f) because its letter failed to provide a reason for the extension.
The statute does not mention what type of reason for extension must be supplied to the applicant. Subdivision 3(f) only required the township to provide Manco with "reasons." The letter stated that the township intended "to take an additional 60 days to make a decision on the special use permit application." To take more time to make a decision is a reason. Without any more specific guidance from the legislature, we conclude that the township's letter complied with subdivision 3(f).

B. Substantial Compliance
The district court, in denying Manco's petitions, concluded that the township's letter substantially complied with the notice requirements under Minn.Stat. § 15.99. The doctrine of substantial compliance recognizes that
the law does not mandate in all cases strict and literal compliance with all procedural requirements. Technical defects in compliance which do not reflect bad faith, undermine the purpose of the procedures, or prejudice the rights of those intended to be protected by the procedures will not suffice to overturn governmental action, particularly where, as here, substantial commitments have been made.
City of Minneapolis v. Wurtele, 291 N.W.2d 386, 391 (Minn.1980).
Manco, emphasizing the directory and detailed nature of the statute, argues that application of the doctrine of substantial compliance was erroneous because Minn.Stat. § 15.99 is a mandatory, rather than a directory, statute.
One test for distinguishing between directory and mandatory statutes is that if a statute expresses the consequences of a failure to comply with its provisions, it is mandatory. Sullivan v. Credit River Township, 299 Minn. 170, 176-77, 217 N.W.2d 502, 507 (1974).
It seems clear that Minn.Stat. § 15.99, subd. 2 (government must take action within 60 days), is mandatory because it provides consequences, namely approval of a petition by operation of law, for noncompliance. We conclude that Minn.Stat. § 15.99, subd. 2, is mandatory and the doctrine of substantial compliance would not apply thereto.
Simply because subdivision 2 is mandatory, however, does not control the outcome of this case. A statute may have portions that are mandatory and portions that are directory. See State ex rel. Phillips v. Neisen, 173 Minn. 350, 352, 217 N.W. 371, 372 (1928) (holding that certain requirements of statute were mandatory but others were directory). The subdivision in question in this case is subdivision 3(f) (granting of extensions). In subdivision 3(f), unlike subdivision 2, there is no explicit consequence for the township's failure to provide "reasons."
In Phillips, petitioners sought to compel via a writ of mandamus the respondent county board to publish a county financial statement as required under statute. Id. at 351, 217 N.W. at 372.

*296 The statute requires the financial statement to be made annually on the first Tuesday after the first Monday in January, and the publication thereof for three successive weeks, within 30 days thereafter, in some newspaper in the county.
Id. The county failed to publish the statement within 30 days. Id. The court held that the statute was mandatory regarding the need to publish the statement, but the 30-day period was only directory because there was no consequence for not publishing within 30 days, and the same goal, publication, would be met regardless of whether it was done in 30 or 40 days. Id. at 352, 217 N.W. at 372.
In our case, Manco correctly points out that the underlying purpose of Minn.Stat. § 15.99 is to keep government agencies from taking too long in deciding issues like the one in question. Unless the applicant agrees to allow the government a longer period of time, the original 60-day time limit in subdivision 2 and the additional 60-day extension allowed under subdivision 3(f) serve as evidence of the legislature's intent to require government to make decisions within 120 days of its initial consideration. There is no dispute that the township ultimately rendered its decision within 120 days.
Like the publication element in Phillips, the timing element in Minn.Stat. § 15.99, subd. 2, is mandatory. On the other hand, subdivision 3(f) does not direct a government entity or this court regarding the contents, type, or length of the reasons a government provides to an applicant. Nor does subdivision 3(f) provide a negative consequence should the government entity fail to provide reasons. We conclude, therefore, that subdivision 3(f) is directory, and as such, the doctrine of substantial compliance is applicable to this subdivision.
Our conclusion is further supported by caselaw that has applied the doctrine of substantial compliance to actions where the government has acted on CUP applications and other zoning issues under directory statutes or ordinances. See, e.g., Chandler v. Kroiss, 291 Minn. 196, 203-04, 190 N.W.2d 472, 476-77 (1971) (substantial compliance applied to uphold village council's actions even though it failed to make required written findings regarding special use permit); see also Itasca County v. Rodenz, 268 N.W.2d 423, 424 (Minn.1978) (where county enacted ordinance without publishing notice in exact compliance with that required by statute, doctrine of substantial compliance applied to prevent voiding ordinance because evidence satisfied court that public had adequate notice of hearing). In sum, we affirm the district court's application of the doctrine of substantial compliance to subdivision 3(f).

DECISION
Because the township informed Manco that 60 additional days were required to make a decision on Manco's pending conditional use permit application, the township complied with the requirements of Minn.Stat. § 15.99, subd. 3(f), and the district court's denial of Manco's petition for mandamus was proper. Further, the district court properly applied the doctrine of substantial compliance to the township's letter because subdivision 3(f) of the statute is directory.
Affirmed.
NOTES
[*]  Retired judge of the district court, serving as judge of the Minnesota Court of Appeals by appointment pursuant to Minn. Const. art. VI, § 10.
