
17 N.Y.3d 180 (2011)
951 N.E.2d 743
928 N.Y.S.2d 221
2011 NY Slip Op 5543
BRAD H. et al., on Behalf of Themselves and All Others Similarly Situated, Appellants,
v.
CITY OF NEW YORK et al., Respondents.
No. 126
Court of Appeals of New York.
Argued May 31, 2011.
Decided June 28, 2011.
*181 Debevoise & Plimpton LLP, New York City (Christopher K. Tahbaz, Matthew S. Hackell, Julie M. Calderon Rizzo and Cari Almo Wint of counsel), New York Lawyers for the Public Interest, Inc. (Roberta Mueller of counsel), and Urban Justice Center (Jennifer J. Parish and Douglas Lasdon of counsel), for appellants.
*182 Michael A. Cardozo, Corporation Counsel, New York City (Drake A. Colley, Jeffrey S. Dantowitz and Edward F.X. Hart of counsel), for respondents.
Chief Judge LIPPMAN and Judges CIPARICK and JONES concur with Judge GRAFFEO; Judge PIGOTT dissents and votes to affirm in a separate opinion in which Judges READ and SMITH concur.

OPINION OF THE COURT
GRAFFEO, J.
This case involves a dispute over the status of a negotiated settlement agreement pertaining to New York City's duty to provide mental health services to certain inmates in its jails. We are asked whether the term of the agreement expired before plaintiffs filed a motion in Supreme Court seeking to extend the City's obligations. Applying our State's traditional principles of contract interpretation, we hold that plaintiffs sought relief prior to termination of the settlement agreement and their motion was therefore timely filed.

I
Plaintiffs initiated this action in 1999, seeking injunctive and declaratory relief for themselves and other mentally ill inmates *183 in New York City jails.[1] According to plaintiffs, the City had failed to satisfy its duty under the State Constitution and Mental Hygiene Law to provide adequate "discharge planning" services for mentally ill persons completing their terms of incarceration. More particularly, plaintiffs requested that the City establish discharge planning that included continuing access to medication, community-based mental health treatment, housing and public benefits. Plaintiffs were certified as a class and granted a preliminary injunction (185 Misc 2d 420 [Sup Ct, NY County 2000], affd for reasons stated below 276 AD2d 440 [1st Dept 2000]).
Protracted negotiations culminated in a settlement agreement that was approved by Supreme Court on April 4, 2003. Because the agreement required the City to substantially comply with the settlement requirements 60 days later, the "implementation date" of the settlementi.e., the day compliance by the City became obligatorywas June 3, 2003.
The City's fundamental obligation under the negotiated settlement was to provide plaintiffs with individualized, clinically adequate and appropriate "discharge planning." The goal was to ensure that mentally ill inmates would receive medical treatment and other services immediately upon release or transfer from a City jail by transitioning them into community-based mental health treatment and support services. In furtherance of this objective, the agreement included detailed provisions setting forth the City's responsibilities in this regard.
The parties further agreed that two "compliance monitors" would be appointed to oversee the City's efforts by evaluating "the provision of Discharge Planning in City Jails and [the City's] compliance with the terms of" the settlement. The monitors were to be appointed and "begin the performance of their duties . . . no later than the Implementation Date." The agreement also described the means by which the compliance monitors would evaluate and report on the City's fulfillment of its obligations. The monitors' first report to the court was due in September 2003, three months after the specified implementation date.
The key provision of the agreement at issue in this appeal is the termination clause. The parties stated that the agreement would "terminate at the end of five years after monitoring by *184 the Compliance Monitors begins pursuant to [section] IV" of the settlement agreement.[2] If, however, plaintiffs could demonstrate before the agreement expired that the City had failed to adequately discharge its responsibilities for two years, they could ask Supreme Court to extend the settlement for an additional two-year period so that violations could be corrected before the agreement terminated. Thus, the only way to determine when the settlement was set to expireand whether a motion by plaintiffs to extend the terms of the settlement was timely filedis to establish the date when monitoring began.
The two monitors were appointed by Supreme Court on May 6, 2003. According to the first report they issued in September 2003, the monitors "began to engage in some limited reviews of draft policies and procedures" on May 19th, met with City attorneys to discuss the draft policies on May 22nd, and observed a training session on May 28th of persons who would conduct the individualized discharge planning for inmates. The City's new discharge planning policies and procedures went into effect on June 3rdin compliance with the implementation date set forth in the settlement agreement. The monitors, however, did not begin their work monitoring the City's activities "in earnest" until June 25, 2003 and, even as of the filing of the September 2003 report, they were unable to provide an opinion regarding the City's compliance with the agreement.
In 2009, the parties were unable to resolve a notice to cure noncompliance issued by plaintiffs and, on May 22, 2009, plaintiffs moved for a temporary restraining order and a preliminary injunction requiring the City to abide by its duties under the settlement agreement. The City cross-moved to dismiss, claiming that the settlement commenced not on the implementation date, but upon the appointment of the monitors on May 6, 2003. Consequently, the City contended that plaintiffs' motion was untimely because the settlement had expired in April 2009 (taking into account the agreed-to extensions).
Supreme Court denied the City's cross motion, concluding that the five-year term began on the implementation date and that the expiration date occurred on May 25 or 26, 2009, thereby rendering plaintiffs' motion timely (2009 NY Slip Op 31561[U]). *185 The Appellate Division reversed in a three to two decision, holding that the five-year term commenced when the monitors engaged in their first affirmative act on either May 19th or 28th in 2003, which produced a termination date of either May 10th or 19th in 2009, both of which were prior to the filing date of plaintiffs' motion (77 AD3d 103, 107 [1st Dept 2010]). The dissenters concluded that the agreement was ambiguous and, as such, the parties' course of conducttreating the commencement date of the five-year period as no earlier than the implementation date of June 3, 2003should be used to calculate the termination date. After we dismissed plaintiffs' appeal as of right for lack of finality (15 NY3d 937 [2010]), the Appellate Division granted leave to appeal and certified a question of law to us, which we now answer in the negative.

II
Plaintiffs assert that their May 2009 motion premised on the City's alleged noncompliance was filed before expiration of the settlement agreement because the parties' agreement unambiguously provides that monitoring was not to begin before the implementation date of June 3, 2003. According to plaintiffs, the purpose of the settlement was to institute adequate discharge planning and the agreement did not obligate the City to provide that service until the implementation date. The City, in contrast, claims that monitoring began no later than May 28, 2003 (when a monitor observed a training session) because it was possible for the monitors to begin evaluating the City's plans for compliance before the implementation date. The City also argues that if the parties intended the five-year period to start on the implementation date, the termination provision would have specifically referred to that event rather than the commencement of monitoring activities.
The settlement agreement is a contract and its meaning must be discerned under several cardinal principles of contractual interpretation. A written agreement that is clear, complete and subject to only one reasonable interpretation must be enforced according to the plain meaning of the language chosen by the contracting parties (see e.g. Vintage, LLC v Laws Constr. Corp., 13 NY3d 847, 849 [2009]; Samuel v Druckman & Sinel, LLP, 12 NY3d 205, 210 [2009]; Greenfield v Philles Records, 98 NY2d 562, 569 [2002]). To determine whether a writing is unambiguous, language should not be read in isolation because the contract must be considered as a whole (see e.g. Consedine v *186 Portville Cent. School Dist., 12 NY3d 286, 293 [2009]; Bailey v Fish & Neave, 8 NY3d 523, 528 [2007]; Vermont Teddy Bear Co. v 538 Madison Realty Co., 1 NY3d 470, 475 [2004]). Ambiguity is determined within the four corners of the document; it cannot be created by extrinsic evidence that the parties intended a meaning different than that expressed in the agreement and, therefore, extrinsic evidence "may be considered only if the agreement is ambiguous" (Innophos, Inc. v Rhodia, S.A., 10 NY3d 25, 29 [2008] [internal quotation marks omitted]; see e.g. Goldman v White Plains Ctr. for Nursing Care, LLC, 11 NY3d 173, 176 [2008]; Van Kipnis v Van Kipnis, 11 NY3d 573, 577 [2008]). Ambiguity is present if language was written so imperfectly that it is susceptible to more than one reasonable interpretation (see e.g. Evans v Famous Music Corp., 1 NY3d 452, 458 [2004]; Nissho Iwai Europe v Korea First Bank, 99 NY2d 115, 121-122 [2002]).
In this case, the provision at issue in the settlement agreement the clause that establishes termination of the settlement reads: "five years after monitoring by the Compliance Monitors begins." But when did monitoring begin? In our view, the answer to this question becomes clear and unambiguous if the agreement is read as an integrated whole with a focus on the two fundamental purposes that the monitors were intended to serve.
Paragraph 108 of the agreement states that their function was "to monitor [1] the provision of Discharge Planning in City Jails and [2] Defendants' compliance with the terms of this Agreement." The Appellate Division believed that it was possible for the monitors to undertake their first responsibility prior to the implementation date because the development of the discharge planning process necessarily occurred before any inmates were actually evaluated. Paragraph 1 (bb), however, explicitly states that "Discharge Plan" refers to "the plan describing the manner in which an individual will be able to receive a clinically appropriate level of continuing mental health treatment" and other assistance "immediately upon his or her release from or transfer out of a City Jail"not the preliminary planning and the organizational steps the City needed to take before the program could be initiated. Thus, paragraph 108's reference to discharge planning does not include the initial development of substantive and procedural discharge planning guidelines undertaken before the actual implementation and evaluations of inmates occurred on or after June 3, 2003. *187 Indeed, the City now concedes that the individualized discharge planning process did not commence until the implementation date arrived. Because these services were not available to inmates earlier than that date, it necessarily follows that there were no discharge plans for the monitors to oversee until June 3, 2003.[3]
The monitors' second objectiveto assess the City's compliance with the settlementalso leads to the conclusion that the five-year term began on the implementation date. It is true, as the City observes, that in various sections of the settlement document there is an indication that the monitors could perform certain duties in anticipation of the implementation date. Paragraph 127 of the agreement, for example, suggests that the monitors could review drafts of manuals, training materials and other documents before the implementation date. In fact, the monitors conducted such a review on May 19, 2003. The City also notes that the monitors had access to staff and facilities, and a monitor attended a training session on May 28th. Such attendance was listed in the agreement as one of the means by which the monitors could discharge their responsibilities.
But the fact that the monitors began preparatory work before the implementation date is not dispositive. The termination provision was triggered five years after the commencement of monitoring, not the start of planning or preparatory work. And compliance could not be monitored before it was required by the agreement or attempted by the City. It simply was not possible for the monitors to review whether the City was in "compliance with the terms of th[e] Agreement" before June 3, 2003 because it is undisputed that the City had not yet begun the individualized inmate discharge planning process and it was not contractually obligated to be in compliance until the implementation date (see ¶ 160 ["Defendants and their contractors shall be in substantial compliance with the terms of this Settlement Agreement at all times after the Implementation *188 Date"]; see also ¶ 105 [the City "shall complete the implementation of all aspects of this Settlement Agreement no later than the Implementation Date"]). Stated differently, the monitors could review whether the City abided by the terms of the settlement agreement only after the City began to issue discharge plans for inmates or compliance became obligatory, whichever occurred first.[4]
The settlement, in essence, did not give plaintiffs five years of involvement with monitoring; it gave them five years of mental health service discharge planning for inmates that was to be monitored for compliance. As a result, these two concepts discharge planning and oversight of the programwere necessarily interrelated. To read the agreement as creating monitoring before compliance was necessary or discharge planning and services were actually available to inmates is inconsistent with the language of the settlement, would undermine its overarching purpose and is foreclosed by our precedent on contractual interpretation.
Because discharge plans for eligible inmates and the monitoring of the City's compliance obligations did not begin until June 3, 2003, we hold that the monitoring functions occurred no earlier than that date and the agreement did not terminate until at least five years and 356 days later on May 25 or 26, 2009. Since plaintiffs filed their motion for a temporary restraining order and a preliminary injunction on May 22, 2009, Supreme Court did not lack jurisdiction over the case and it properly denied the City's cross motion to dismiss.[5]
Accordingly, the order of the Appellate Division should be reversed, with costs, the order of Supreme Court reinstated and the certified question answered in the negative.
PIGOTT, J. (dissenting).
Because there is nothing in the record to support the theory that monitoring began on or after June 3, *189 2003, I would affirm the order of the Appellate Division (77 AD3d 103 [2010]) and answer the certified question in the affirmative, holding that monitoring began on May 19, 2003. For that reason, I respectfully dissent.
The stipulation of settlement provided, in paragraph 193, that it would "terminate at the end of five years after monitoring by the Compliance Monitors begins pursuant to [section] IV." We are called upon to determine, as a matter of law, when monitoring began. The majority opts for the settlement agreement's implementation dateJune 3, 2003. This would have been an easy date for the parties to choose to mark the beginning of the five years; after all, the implementation date is defined in the agreement. But the parties elected not to do so. In fact, the theory that monitoring began on or after the implementation date flies in the face of unambiguous language in section IV of the agreement, and the undisputed activities of the monitors themselves.
Plaintiffs have two principal arguments in opposition to defendants' contention that the agreement had expired when they filed their motionthat monitoring logically could not begin before the implementation date, and that monitoring in fact did not begin before the implementation date. Both arguments are contrary to the record.
There is no doubt that the settlement agreement contemplated the possibility that the compliance monitors would begin monitoring before the implementation date; the stipulation made sure that the compliance monitors would be appointed in time "so that they can begin the performance of their duties pursuant to [the] Settlement Agreement no later than the Implementation Date" (¶ 113 [emphasis added]). The implementation date was simply a deadline. As the majority puts it, "if the City had begun discharge planning at some earlier point in time, the monitors could have started their compliance review on a date earlier than June 3, 2003" (majority op at 188 n 4).
Section IV, paragraph 108 of the stipulation gave the compliance monitors a single task, "to monitor," and specified two objects of that monitoring: "the provision of Discharge Planning in City Jails and Defendants' compliance with the terms of [the Settlement]." Pursuant to the stipulation, both monitoring of discharge planning and monitoring of compliance could begin before the implementation date.
The majority attempts to defend the position that, under the stipulation, it was impossible for the compliance monitors to *190 monitor discharge planning until after the implementation date. They cite paragraph 1 (bb) of the stipulation, which defines a "Discharge Plan" as a "plan describing the manner in which an individual" will receive mental health treatment and other assistance immediately upon release or transfer from a City jail. According to the majority, the term "Discharge Planning" in paragraph 108 refers to such discharge plans, which were not available for monitoring until after the implementation date. However, that argument ignores paragraph 1 (cc) of the stipulation, which defines "Discharge Planning" as "the process of formulating and implementing the Discharge Plan" (emphasis added). Because the settlement agreement expressly contemplated monitoring of the creation of discharge plans, there is no basis for the assertion that monitoring did not embrace the initial development of discharge planning guidelines before the actual implementation. Indeed, under paragraph 127 of the settlement agreement, defendants had to provide the compliance monitors with materials related to "the provision of Discharge Planning" that were "in existence on the date on which the Compliance Monitors are appointed"i.e. discharge planning materials that existed before the implementation date.
It is also clear that monitoring did as a matter of fact begin before the implementation date. According to the compliance monitors' First Report, they began on May 19, 2003 to engage in reviews of defendants' draft policies and procedures, and to participate in meetings. One monitor observed a training session of persons who would conduct discharge planninga task that the stipulation expressly listed as a "principal means of monitoring" (¶ 118).
In the same Report, the monitors provided a table outlining "the major monitoring activities" (emphasis added) they had engaged in. The table begins with the training observation, which occurred on May 28, 2003. Moreover, an invoice, dated November 3, 2003, charges for the monitors' services at an hourly rate, with the first charge incurred on May 19, 2003, the same date that the monitors said they began work. Clearly, the monitors considered themselves to have begun monitoring before the June 3, 2003 implementation date. There is no reason for disregarding the monitors' own assessments of when they commenced monitoring.
If plaintiffs had wished to ensure five years of monitoring after the implementation date, they could easily have done so. Instead they made the agreement terminate five years after *191 monitoring began, presumably because at the time of the stipulation that date remained uncertain. It may be that they expected that there would be delays in the appointment of the compliance monitors. Perhaps plaintiffs wanted to guarantee five years of monitoring, even if the monitors started their duties some time after the implementation date. But when plaintiffs decided they would be filing an enforcement action, it was incumbent on them to bear in mind that the monitors had in fact started their monitoring duties before the implementation date.
Order reversed, etc.
NOTES
[1]  The complaint named a number of defendants who we will collectively refer to as "the City."
[2]  Over the course of the agreement, the parties consented to extensions that tolled the expiration date by 356 days. Therefore, the expiration date is to be calculated using five years plus 356 days.
[3]  Paragraph 1 (cc) of the agreement, relied on in the dissent, is entirely consistent with this result. It defines "Discharge Planning" as the "process of formulating and implementing the Discharge Plan," and from this clause the dissent concludes that the agreement "contemplated monitoring of the creation of Discharge Plans" (dissenting op at 190). We do not disagree with this point. However, the flaw in the dissent's reasoning is that it fails to recognize that a "Discharge Plan" (as that term is defined in paragraph 1 [bb]) refers to evaluation of the needs of individual inmates. Such personalized evaluation was not available until June 3, 2003.
[4]  Certain portions of the settlement agreement indicate that it was possible for the City to begin discharge planning before the implementation date, but the fact remains that it did not do so. That possibility also explains why the parties did not establish a specific implementation date in the termination clauseif the City had begun discharge planning at some earlier point in time, the monitors could have started their compliance review on a date earlier than June 3, 2003, thereby triggering the commencement of the five-year settlement period. It is evident that the parties contemplated this scenario because they stipulated that monitoring should begin "no later than the Implementation Date."
[5]  In light of this determination, the other issue raised by plaintiffs is academic.
