
533 S.E.2d 631 (2000)
33 Va. App. 368
F. Shriver HERING
v.
Phyllis E. HERING.
Record No. 1280-99-4.
Court of Appeals of Virginia, Alexandria.
September 5, 2000.
Michael A. Ward (Gannon, Cottrell & Ward, P.C., on briefs), Alexandria, for appellant.
David E. Roop, Jr., Washington, DC (Condo & Masterman, P.C., Vienna, on brief), for appellee.
Present: FITZPATRICK, C.J., ANNUNZIATA, J., and DUFF, Senior Judge.
*632 DUFF, Senior Judge.
F. Shriver Hering (husband) filed a petition to terminate spousal support and maintenance, alleging that Phyllis Hering (wife) was habitually cohabiting with a man in a relationship analogous to marriage for a period of more than one year commencing on or after July 1, 1997. Husband contends that, because his payments to wife were spousal support, not a contractual obligation, these payments were amenable to modification by subsequent legislative enactments and, therefore, were terminable under the amended provisions of Code § 20-109(A). For the reasons set out below, we affirm the trial court's decision that application of the amendments to Code § 20-109(A) concerning termination of spousal support under circumstances of cohabitation would amount to an unconstitutional impairment of contract.

Background
The parties entered into a marital settlement agreement (agreement), dated February 28, 1995. In pertinent part, the agreement provided:
SPOUSAL SUPPORT
6. a. The Husband shall pay to the Wife, for her support and maintenance, the sum of $1,500.00 per month, beginning March 1, 1995, and continuing on the first day of each month thereafter through February 1996, the remarriage of the Wife or the death of either party, whichever is earlier.
b. The Husband shall pay to the Wife, for her support and maintenance, the sum of $900.00 per month, beginning March 1, 1996, and continuing on the first day of each month thereafter the remarriage of the Wife or the death of either party, whichever is earlier.
c. The spousal support payments provided for in the preceding subparagraph shall be modifiable by the Circuit Court of Fairfax County, or other court of competent jurisdiction, upon the petition of either party, subject to the requisite showing of a material change in circumstances.
The agreement also provided for incorporation of the agreement into a decree of divorce, as follows:

INCORPORATION IN DECREE OF DIVORCE
29. This Agreement shall not be construed to bar or prevent either party from suing for absolute or limited divorce. If any action for divorce is instituted by either party, any Court in which such action might be filed shall affirm, ratify and incorporate this Agreement in its decree dissolving the marriage or in any decree of divorce from bed and board; provided, however, that this agreement shall survive such incorporation and shall not be merged into any such decree.
The parties presented the agreement to the trial court. The final decree of divorce entered March 3, 1995 provided:
On or about February 28, 1995, the parties entered into a Property and Support Settlement Agreement, which settles all matters pertaining to support and distribution of property. It is the desire and intent of the parties that the Property and Support Settlement Agreement and all the terms and provisions contained therein be incorporated, but not merged, into this Final Decree of Divorce....
ORDERED, that the Property Settlement Agreement dated February 28, 1995, be, and the same hereby is, ratified, affirmed and incorporated, but not merged, into and made a part of this Final Decree of Divorce, in accordance with § 20-109 and § 20-109.1 of the 1950 Code of Virginia, as amended; and the parties are ordered to comply with the provisions contained therein.. ..
By petition filed January 20, 1999, husband sought to terminate his payments to wife pursuant to the newly amended provisions of Code § 20-109(A). Husband also alleged that wife's actions constituted a material change of circumstances warranting termination of wife's spousal support. Wife filed a demurrer to husband's petition, arguing that application of the amended provision amounted to an unconstitutional infringement of the parties' contract. The trial court sustained *633 wife's demurrer, ruling that application of Code § 20-109(A) to the parties' contract would constitute an unconstitutional impairment of contract. Husband appealed. The court also granted husband leave to file an amended petition to develop his allegation of a material change of circumstances. No such petition was filed, and the only issue before us is the court's ruling re the applicability of Code § 20-409(A).
Because the trial court sustained wife's demurrer to husband's petition, we accept as true the facts as alleged by husband and all reasonable inferences drawn from those facts. See Norris v. Mitchell 255 Va. 235, 237, 495 S.E.2d 809, 810 (1998).

Code § 20-109(A)
Effective July 1, 1997, Code § 20-109(A) was substantially amended to read as follows:
§ 20-109. Changing maintenance and support for a spouse; effect of stipulations as to maintenance and support for a spouse; cessation upon cohabitation, remarriage or death.
A. Upon petition of either party the court may increase, decrease, or terminate spousal support and maintenance that may thereafter accrue, whether previously or hereafter awarded, as the circumstances may make proper. Upon order of the court based upon clear and convincing evidence that the spouse receiving support has been habitually cohabiting with another person in a relationship analogous to a marriage for one year or more commencing on or after July 1, 1997, the court may decrease or terminate spousal support and maintenance unless (i) otherwise provided by stipulation or contract or (ii) the spouse receiving support proves by a preponderance of the evidence that termination of such support would constitute a manifest injustice.
Subsequent amendments not relevant to this appeal were effective July 1, 1998.

Incorporation of Agreement
Husband contends that, under Shoosmith v. Scott, 217 Va. 290, 227 S.E.2d 729 (1976) (Shoosmith I), and Shoosmith v. Scott, 217 Va. 789, 232 S.E.2d 787 (1977) (Shoosmith II), his payments to wife were spousal support, not payments pursuant to the parties' contract. By agreeing to incorporate the property and support agreement into the final decree, wife elected to receive spousal support instead of payments under the contract in lieu of spousal support. By so doing, husband's argument continues, wife received the benefit of enforcement through the court's power of contempt in exchange for her right to enforce the contract. Husband concedes that, if the payments to wife remain a vested contractual obligation, then under Shoosmith I and Shoosmith II, that obligation may, not be impaired by the subsequent legislative amendments to Code § 20-109(A).
We find that the parties' contract remained enforceable. The parties expressly provided that their agreement was to be "incorporated, but not merged" into any final decree. While ordering the parties to comply with the provisions of the agreement, the final decree also expressly provided that the agreement was not merged. Husband's argument glosses over the effect of the parties' express provision that the agreement not be merged into the final decree. We are not at liberty to ignore a contractual provision specifically included by the parties.
Our previous decisions and those of the Supreme Court of Virginia draw a distinction among situations where an agreement is affirmed, where it is incorporated into a decree, or where, as here, the agreement is "affirmed, ratified, incorporated, but not merged" into the final decree. In the context of an agreement concerning child support, we noted that
[i]f the court accepts the agreement, its decree may merely approve, ratify or affirm the agreement, in whole or in part, without incorporating its provisions into the decree or ordering payment or compliance with its terms. See Shoosmith v. Scott, 217 Va. 789, 791-93, 232 S.E.2d 787, 788-89 (1977). In that situation, the decree merely constitutes judicial approval of a private bilateral contract, see Rodriguez [v. Rodriguez], 1 Va.App. [87,] 90, 334 S.E.2d [595,] 597 [ (1985) ] (citing Shoosmith *634 v. Scott (citation omitted)), and the provisions of the support agreement do not have the full force and effect of a court's decree and are not enforceable by the court's contempt powers. See Shoosmith, 217 Va. at 792, 232 S.E.2d at 789. The court also has the option to incorporate by reference the child support provisions, in whole or in part, as part of the final decree, Code § 20-109.1, and retain jurisdiction to enforce compliance through its contempt powers.
Fry v. Schwarting, 4 Va.App. 173, 178, 355 S.E.2d 342, 345 (1987). "`Where ... the circumstances are such that the incorporation of a property settlement in a decree, with directions that the parties perform all its obligations, merges the contract in the decree, the party who desires enforcement must enforce the decree and not the agreement itself.'" Doherty v. Doherty, 9 Va.App. 97, 99-100, 383 S.E.2d 759, 760 (1989) (quoting 24 Am.Jur.2d Divorce and Separation § 858 (1983)). In contrast, "`[w]here the circumstances are such that the agreement, although incorporated or approved in the decree, is not merged therein, the parties may enforce it by suing on the agreement rather than on the judgment.'" Id. at 99-100, 383 S.E.2d at 760 (quoting 24 Am.Jur.2d Divorce and Separation § 858). Where, as here, the agreement was "incorporated but not merged" into the final decree, the agreement remained enforceable under either contract law or through the court's contempt power. See id. at 99, 383 S.E.2d at 760.
Code § 20-109 prohibits the trial judge from entering a decree in a divorce suit except in accordance with a property settlement agreement signed by the parties. Since the agreement provides that if it is affirmed, ratified, and incorporated in the final decree it shall not be merged in the final decree, the final order must he read to give effect to that agreement.
Spagnolo v. Spagnolo, 20 Va.App. 736, 745 n. 1, 460 S.E.2d 616, 620 n. 1 (1995). Therefore, the parties' agreement, which was affirmed and incorporated, but not merged, into the final decree, remained a separate, enforceable, contractual obligation.
While husband also argues that the 1997 amendments to Code § 20-109(A) should apply to this case, we find that argument unpersuasive. Legislative amendments affecting substantive rights are generally presumed to apply prospectively, unless a contrary legislative intent is evident. See Shiflet v. Eller, 228 Va. 115, 319 S.E.2d 750 (1984). "[R]etroactive effect will be given to a statute only when legislative intent that a statute be so applied is stated in clear, explicit, and unequivocal terms; otherwise, a statute will be applied prospectively only and applied only to cases that arise thereafter." Foster v. Smithfield Packing Co., 10 Va.App. 144, 147, 390 S.E.2d 511, 513 (1990). The legislation here, to the extent it includes an effective date, refers to a period beginning on or after July 1, 1997, a date well after the parties executed their agreement and the trial court entered the final decree of divorce. We find no merit in husband's argument that additional amendments made in 1998 demonstrate the legislature's intent regarding the 1997 amendments.
In addition,
[o]ne of the basic rules of construction of contracts is that the law in force at the date of making a contract determines the rights of the parties under the contract. The law effective when the contract is made is as much a part of the contract as if incorporated therein.
Paul v. Paul, 214 Va. 651, 653, 203 S.E.2d 123, 125 (1974) (citations omitted) (legislative change reducing age of emancipation did not apply to parties' contractual agreement to pay child support until age twenty-one or "otherwise emancipated"). We find no reason to vary from these well established principles.
In sum, we agree with the decision of the circuit court that the application of the amended language of Code § 20-109(A) to the circumstances of these parties would be an unconstitutional impairment of contract. At the time the parties entered into their agreement, they provided only for termination of spousal support in the event wife remarried or either party died. They included no provision terminating spousal support *635 based upon wife's cohabitation. "A court is not at liberty to rewrite a contract simply because the contract may appear to reach an unfair result." Kaufman v. Kaufman, 7 Va. App. 488, 501, 375 S.E.2d 374, 381 (1988). This is not an instance where the parties failed to expressly address in their agreement options existing under current legislation. Cf MacNelly MacNelly, 17 Va.App. 427, 437 S.E.2d 582 (1993) (agreement that was silent as to the effect of remarriage failed to abrogate effect of Code § 20-109 terminating spousal support upon death or remarriage); Radford v. Radford, 16 Va.App. 812, 433 S.E.2d 35 (1993) (agreement that was silent as to the effect of either death or remarriage failed to abrogate statutory language of Code § 20-109 terminating spousal support upon death or remarriage).
Accordingly, the decision of the circuit court is affirmed.
Affirmed.
