
62 Cal.App.4th 1508 (1998)
BODELL CONSTRUCTION COMPANY, Plaintiff and Respondent,
v.
TRUSTEES OF THE CALIFORNIA STATE UNIVERSITY, Defendant and Appellant.
Docket No. D028092.
Court of Appeals of California, Fourth District, Division One.
April 13, 1998.
*1510 COUNSEL
J. Michael Reed, Anne L. Rauch, Wehner & Perlman and Rodney M. Perlman for Defendant and Appellant.
Clyde A. Romney and William D. Wheelock for Plaintiff and Respondent.
*1511 OPINION
NARES, J.
Defendant Trustees of the California State University (the State) appeals from the judgment on special jury verdict entered in favor of plaintiff Bodell Construction Company (Bodell). The State also appeals from a postjudgment order awarding to Bodell prejudgment interest under Civil Code section 3287, subdivision (a), and determining that Bodell is entitled to recover its costs of suit from the State under the "cost-shifting" penalty provisions of subdivision (c) of Code of Civil Procedure section 998 as amended in 1994,[1] on the ground it obtained a judgment more favorable than the State's section 998 offer to compromise.[2]
In a civil action, if a plaintiff rejects a defendant's section 998 offer to compromise and later prevails after trial but fails to obtain a judgment more favorable than the defendant's offer, he or she may recover preoffer costs but the mandatory penalty provisions of subdivision (c) of section 998 prohibit the plaintiff from recovering postoffer costs and require that he or she pay the defendant's postoffer costs. (§ 998, subd. (c); Stiles v. Estate of Ryan (1985) 173 Cal. App.3d 1057, 1064-1065 [219 Cal. Rptr. 647].) Under the discretionary penalty provisions of section 998, subdivision (c), the trial court in such a case may in its discretion require the plaintiff to pay not only the defendant's ordinary court costs from the date of filing of the complaint, but also the defendant's expert witness costs.
To provide some guidance on what constitutes a "more favorable judgment" in a nontort action, such as the case before us here, the Legislature amended subdivision (c) of section 998 in 1994 by adding language stating "... a plaintiff in a cause of action not based on tort shall not be deemed to have obtained a more favorable judgment unless the judgment obtained by the plaintiff, exclusive of attorney's fees and costs, exceeds the offer made *1512 by the defendant pursuant to this section...." (§ 998, subd. (c), italics added.)
Here, the State made a section 998 offer to compromise in the amount of $525,000 to settle Bodell's breach of construction contract action. This offer, which Bodell did not accept, exceeded by about $128,000 the amount of damages (exclusive of prejudgment interest) the jury later awarded to Bodell. In a posttrial order, the court awarded to Bodell preoffer and postoffer prejudgment interest in the amount of about $147,000 under subdivision (a) of Civil Code section 3287, which the court added to the jury award of about $397,000. The resulting damage award in favor of Bodell in the sum of about $544,000 exceeded the State's offer to compromise by about $19,000. In the same posttrial order, the court determined that Bodell had obtained a judgment which was "more favorable" than the State's $525,000 offer within the meaning of subdivision (c) of section 998, and ordered that Bodell was entitled to recover its costs of suit (about $41,000) from the State.
The State appeals, contending the court erred in adding prejudgment interest to the jury's damage award in determining under section 998, subdivision (c), whether the judgment Bodell obtained was "more favorable" than the State's statutory settlement offer. This contention is twofold. First, the State maintains that no prejudgment interest should be added to the jury's damage award in favor of Bodell in determining whether the judgment is "more favorable" than the State's section 998 offer. In the alternative, the State contends that if prejudgment interest is added to the jury award in making this determination, postoffer prejudgment interest should be excluded from the analysis.
Although we disagree with the State's first contention that no amount of prejudgment interest should be included in the "more favorable judgment" analysis, we agree with the State's alternative contention. In order to promote its legislative purpose of encouraging settlement of civil litigation prior to trial, we construe subdivision (c) of section 998 to require that in a nontort action in which the plaintiff has not accepted a defendant's section 998 offer to compromise, postoffer prejudgment interest awarded to the plaintiff under Civil Code section 3287 be excluded in determining whether the plaintiff has obtained a judgment "more favorable" than the defendant's offer. We also conclude that any preoffer prejudgment interest the plaintiff is entitled to recover under Civil Code section 3287 in a nontort action is to be included in determining whether the plaintiff has obtained a "more favorable judgment" within the meaning of subdivision (c) of section 998.
*1513 We further conclude the court erred by including postoffer prejudgment interest in determining that Bodell had obtained a "more favorable judgment." Because we determine on independent review that Bodell failed to obtain a judgment "more favorable" than the State's reasonable offer to compromise, we reverse the portions of the judgment and order awarding costs to Bodell, and otherwise affirm the judgment.

FACTUAL AND PROCEDURAL BACKGROUND
Bodell is a general contractor that entered into an agreement with the State for the construction of a campus building known as Craven Hall at the San Marcos campus of the California State University. As modified by a change order, the contract required Bodell to complete construction by September 28, 1992. Bodell did not complete construction by that date, but did substantially complete the project on December 14, 1992, at which time the State took beneficial use and occupancy.
The contract provided for the assessment of liquidated damages against Bodell in the amount of $4,000 for each day completion was delayed beyond the agreed completion date. Under this provision the State withheld liquidated damages in the sum of $304,100 from Bodell's progress payments for the delay in completion from September 28, 1992, through December 14, 1992.
Following completion of the project, Bodell filed a claim with the State seeking return of the liquidated damages, and compensation for additional work performed and certain alleged damages related to the delayed completion of the project. A contractor's claims review board convened by the State awarded Bodell $91,341 for additional work performed, offered a reduction in the amount of liquidated damages, and rejected virtually all of Bodell's delay damages. Under this award the State would have paid nothing to Bodell, and would have retained about $44,000 of the contract balance. Bodell rejected the award and in March 1994 filed this action for breach of construction contract against the State.[3]
On May 15, 1996, the State served on Bodell a section 998 offer to compromise in the amount of $525,000. This offer included statutory costs Bodell was entitled to recover, but provided each party would bear its own *1514 attorney fees. Bodell did not accept this offer and served the State with its own statutory settlement offer in the amount of $900,000.
The case proceeded to trial. On November 18, 1996, the jury returned its verdict in favor of Bodell in the amount of $396,624.[4]
On November 21, 1996, judgment was entered in favor of Bodell in the amount of the jury verdict. By stipulation of the parties the determination of the amount of prejudgment interest Bodell was entitled to recover was reserved to the court.

Bodell's postjudgment motion for prejudgment interest and a determination it had obtained a judgment "more favorable" than the State's section 998 offer
Bodell moved for an award of prejudgment interest under Civil Code section 3287, subdivision (a). Bodell urged the court to calculate prejudgment interest on the liquidated damages portion of the jury verdict ($304,100) at the rate of 10 percent per annum from the dates Bodell submitted its three progress payment requests to the State[5] up to the date of entry of judgment. Bodell also requested prejudgment interest on the jury's award of $91,341 for additional work performed at the rate of 10 percent per annum from the date of the February 1994 claims review board award letter to the date of entry of judgment.
In conjunction with its motion for prejudgment interest, Bodell also moved for an order determining that for purposes of subdivision (c) of section 998 it had obtained a judgment that was "more favorable" than the State's offer to compromise, and thus as the prevailing party it was entitled to recover its costs of suit. Bodell argued that its request for $147,180 in prejudgment interest, if granted, would result in a total judgment in its favor in the amount of $543,804, which for purposes of section 998, subdivision (c), would be deemed "more favorable" than the State's $525,000 statutory offer.
*1515 In its written opposition to Bodell's motion, the State argued (among other things) that in order to effectuate the policy behind section 998 of encouraging settlement of litigation, "the calculation of damages in the nature of prejudgment interest must stop at the point of the settlement offer to determine under ... section 998 whether a judgment is more favorable than an offer of compromise." The State also maintained that an award of prejudgment interest on the jury's verdict up to the date of the State's section 998 offer (May 15, 1996) would increase the total judgment to only $519,870, which was less favorable to Bodell than the State's $525,000 statutory offer. The State urged the court to impose on Bodell the "cost-shifting" penalties set forth in section 998, subdivision (c), and requested that the court award to the State its postoffer costs of suit plus the expert witness costs it had incurred in preparation for trial.
On January 29, 1997, the court awarded to Bodell prejudgment interest in the amount of $147,080, and rejected the State's arguments regarding the exclusion of postoffer prejudgment interest from the section 998 analysis. The court ordered that the judgment in favor of Bodell be modified to include the prejudgment interest award, and determined that the resulting judgment in the amount of $544,000 exceeded the State's $525,000 statutory offer. Accordingly, the court found that Bodell had obtained a judgment that was "more favorable" than the offer within the meaning of section 998, subdivision (c), and thus Bodell was entitled to recover its costs of suit. This appeal from the modified judgment and the postjudgment order followed.

STANDARDS ON REVIEW
The trial court made its determination solely upon the basis of its interpretation of subdivision (c) of section 998, applied to undisputed facts. (1) As we stated in Rudd v. California Casualty Gen. Ins. Co. (1990) 219 Cal. App.3d 948, 951-952 [268 Cal. Rptr. 624], "[i]t is well settled that the interpretation and application of a statutory scheme to an undisputed set of facts is a question of law [citation] which is subject to de novo review on appeal. [Citation.] Accordingly, we are not bound by the trial court's interpretation."
The applicable canons of statutory construction which guide our interpretation of subdivision (c) of section 998 are also well settled. (2) "The fundamental rule of statutory construction is that the court should ascertain the intent of the Legislature so as to effectuate the purpose of the law. [Citations.]" (Select Base Materials v. Board of Equal. (1959) 51 Cal.2d 640, 645 [335 P.2d 672].) In determining that intent, we first examine the words *1516 of the statute itself. (California Teachers Assn. v. San Diego Community College Dist. (1981) 28 Cal.3d 692, 698 [170 Cal. Rptr. 817, 621 P.2d 856].) Under the so-called "plain meaning" rule, courts seek to give the words employed by the Legislature their usual and ordinary meaning. (Lungren v. Deukmejian (1988) 45 Cal.3d 727, 735 [248 Cal. Rptr. 115, 755 P.2d 299].) If the language of the statute is clear and unambiguous, there is no need for construction. (Ibid.) However, the "plain meaning" rule does not prohibit a court from determining whether the literal meaning of a statute comports with its purpose. (Ibid.) If the terms of the statute provide no definitive answer, then courts may resort to extrinsic sources, including the ostensible objects to be achieved and the legislative history. (People v. Coronado (1995) 12 Cal.4th 145, 151 [48 Cal. Rptr.2d 77, 906 P.2d 1232].) "`We must select the construction that comports most closely with the apparent intent of the Legislature, with a view to promoting rather than defeating the general purpose of the statute, and avoid an interpretation that would lead to absurd consequences.' [Citation.]" (Ibid.) The legislative purpose will not be sacrificed to a literal construction of any part of the statute. (Select Base Materials v. Board of Equal., supra, 51 Cal.2d at p. 645.)
We must apply these principles in construing subdivision (c) of section 998, as it was codified in January 1997 when the court modified the judgment, to determine whether any amount of prejudgment interest should be added to a jury's damage award in determining under the statute whether the resulting judgment in favor of the plaintiff is "more favorable" than the defendant's statutory offer to compromise. If the answer is yes, we must also determine whether postoffer prejudgment interest should be excluded from the analysis.

DISCUSSION
(3a) The State contends the court erred in adding prejudgment interest to the jury's damage award in determining under section 998, subdivision (c), that the judgment Bodell obtained was "more favorable" than the State's statutory offer. This contention is twofold. The State first maintains that no prejudgment interest should be added to the jury's damage award in favor of Bodell in determining whether the judgment is "more favorable" than the State's section 998 offer. The State alternatively contends that if prejudgment interest is added to the jury award, the postoffer portion of the prejudgment interest award should be excluded from the section 998 analysis.
*1517 We agree with the State's alternative contention. In order to promote the legislative purpose of section 998 to encourage settlement of civil litigation prior to trial, we construe subdivision (c) of section 998 as amended in 1994 to require that in a nontort action in which the plaintiff has not accepted a defendant's section 998 offer to compromise, postoffer prejudgment interest awarded to the plaintiff under Civil Code section 3287 must be excluded in determining whether the plaintiff has obtained a judgment "more favorable" than the defendant's offer. We also conclude that any preoffer prejudgment interest the plaintiff is entitled to recover under Civil Code section 3287 in a nontort action must be included in determining whether the plaintiff has obtained a "more favorable judgment" within the meaning of subdivision (c) of section 998.

I

Statutory Construction of Section 998, Subdivision (c)
Section 998 sets forth a statutory framework under which any party to a lawsuit may serve upon any other party not less than 10 days prior to commencement of trial a written offer to compromise which, if accepted, allows judgment to be taken in accordance with the terms and conditions set forth in the offer. (§ 998, subd. (b)(1).) This framework also provides for mandatory and discretionary cost penalties against a party who rejects a valid and reasonable offer and thereafter fails to obtain a "more favorable judgment." (§ 998, subds. (c), (d); Civ. Code, § 3291.[6]) The general parameters of this penalty feature are set forth in subdivision (a) of section 998, which provides that "[t]he costs allowed under Sections 1031[[7]] and 1032[[8]] shall be withheld or augmented as provided in this section."


*1518 1. Legislative purpose of section 998

(4) As recognized in numerous California decisions, the clear purpose of section 998 (like that of its predecessor, former section 997)[9] is to encourage the settlement of lawsuits prior to trial, and penalize litigants who fail to accept what, in retrospect, is determined to have been a reasonable settlement offer. (Bank of San Pedro v. Superior Court (1992) 3 Cal.4th 797, 804 [12 Cal. Rptr.2d 696, 838 P.2d 218]; T.M. Cobb Co. v. Superior Court, supra, 36 Cal.3d at p. 280; Shain v. City of Albany (1980) 106 Cal. App.3d 294-299 [165 Cal. Rptr. 69]; Brown v. Nolan (1979) 98 Cal. App.3d 445, 449 [159 Cal. Rptr. 469]; Distefano v. Hall, supra, 263 Cal. App.2d at p. 385; Bennett v. Brown (1963) 212 Cal. App.2d 685, 688 [28 Cal. Rptr. 485].)


*1519 2. Section 998, subdivision (c)[10]
(3b) Subdivision (c) of section 998 is designed to effectuate this legislative purpose by providing mandatory and discretionary penalties against a plaintiff who fails to obtain a "more favorable judgment" after rejecting the defendant's offer to compromise. When the State made its offer to Bodell, the first sentence of subdivision (c) set forth both the circumstances which would trigger the imposition of penalties against such a plaintiff, and the nature of the mandatory penalties: "(c) If an offer made by a defendant is not accepted and the plaintiff fails to obtain a more favorable judgment, the plaintiff shall not recover his or her costs and shall pay the defendant's costs from the time of the offer...."
The mandatory penalty provisions of subdivision (c) ("... the plaintiff shall not recover his or her costs and shall pay the defendant's costs from the time of the offer") have been judicially interpreted as requiring trial courts to deny to a plaintiff against whom the penalties are imposed the postoffer costs he or she has incurred (Lafayette v. County of Los Angeles (1984) 162 Cal. App.3d 547, 557 [208 Cal. Rptr. 668]), but allowing courts to award preoffer costs incurred by a plaintiff if he or she is the prevailing party under section 1032 (Brown v. Nolan, supra, 98 Cal. App.3d at p. 452; Shain v. City of Albany, supra, 106 Cal. App.3d at pp. 297-299; Stiles v. Estate of Ryan, supra, 173 Cal. App.3d at pp. 1065-1066). Furthermore, this portion of subdivision (c) contains a "cost-shifting" penalty provision ("the plaintiff ... shall pay the defendant's costs from the time of the offer") which unambiguously requires that the offeree plaintiff pay the court costs incurred by the offeror defendant after the offer was made.
The discretionary penalty provisions of subdivision (c) are set forth in the third sentence,[11] and give the trial court discretion in any action or proceeding other than an eminent domain action to require the plaintiff to pay not *1520 only the defendant's ordinary court costs from the date of filing of the complaint, but also the defendant's reasonable expert witness costs "actually incurred and reasonably necessary in either, or both, the preparation or trial of the case by the defendant."
Section 998, like its predecessor (former § 997), does not define the term "more favorable judgment," and before 1994 the statute provided no guidance on how to calculate whether a judgment obtained by a plaintiff was "more favorable" than a defendant's offer to compromise. As a result, the statute was ambiguous as to whether certain cost items, such as statutory attorney fees and ordinary court costs, should be added to, or excluded from, an award of damages in determining whether a plaintiff offeree had obtained a "more favorable judgment."
A series of California court decisions provided the guidance that was missing from section 998 and its predecessor, former section 997, with regard to the treatment of ordinary costs. For example, in construing former section 997 the court in Bennett v. Brown, supra, 212 Cal. App.2d at page 688 held that postoffer costs incurred by the plaintiff must be excluded in determining whether the plaintiff recovered a more favorable judgment. The Bennett court added the plaintiff's preoffer costs ($99.45) to the verdict ($500) for a total judgment of $599.45, which was less than the defendant's $600 offer, and determined the plaintiff had failed to obtain a "`more favorable judgment.'" (Id. at pp. 688-689.) In Shain v. City of Albany, supra, 106 Cal. App.3d at page 299, the court construed subdivision (c) of section 998, and held that a plaintiff's preoffer costs should be added to the amount of the verdict in determining whether the judgment obtained by the plaintiff is "more favorable" than the defendant's offer to compromise.
The courts also provided guidance with regard to the treatment under section 998 of so-called "continuing" damages which a plaintiff continues to incur following the plaintiff's rejection of a defendant's offer to compromise. For example, in Harvard Investment Co. v. Gap Stores, Inc. (1984) 156 Cal. App.3d 704, 713 [202 Cal. Rptr. 891], the court in construing subdivision (c) of section 998 held that "where a judgment includes attorney's fees awarded pursuant to a contractual fee clause, the court must exclude that part of the fee award which represents services performed after a statutory offer is made when it determines whether the provisions of section 998 ... are *1521 applicable." (Italics in original.) The Harvard court reasoned that "[s]uch a rule clearly promotes the purpose and policy behind that section. It encourages settlement; it discourages litigation aimed solely at insuring an award greater than a statutory offer; and it penalizes a plaintiff who fails to accept what, in retrospect, is seen to have been a reasonable offer. [Citations.]" (156 Cal. App.3d at p. 713, italics added.)
Of particular significance to the instant appeal which raises the issue of how courts should treat prejudgment interest awarded under Civil Code section 3287 within the framework of section 998, the Harvard court also explained that inclusion in the section 998 analysis of a plaintiff's postoffer "continuing" damages, like the inclusion of a plaintiff's postoffer costs, would defeat the purpose of section 998: "Just as the inclusion of costs incurred after an offer is made defeats the purpose of section 998, so would the inclusion of damages incurred after the date of an offer. This is especially so when those postoffer damages are attorney's fees incurred in continuing the litigation after the offer...." (Harvard Investment Co. v. Gap Stores, Inc., supra, 156 Cal. App.3d at p. 713, italics in original.)
The facts of the Harvard case illustrate why the purpose of section 998 would be defeated if "continuing" damages in the form of contractual attorney fees were included in the "more favorable judgment" analysis under section 998. Harvard involved an action for breach of lease and waste in which the plaintiff (Harvard) rejected a $125,000 offer to compromise made by the defendant (The Gap). The court filed an intended decision awarding damages in favor of Harvard in the amount of $132,000, which included $82,000 for actual damages and $50,000 in contractual attorney fees incurred both before and after The Gap made the offer to compromise. (156 Cal. App.3d at p. 708.) The trial court denied The Gap's request for an apportionment of the attorney fees award into preoffer fees and postoffer fees, and entered judgment in accordance with the court's intended decision. (Id. at p. 709.)
On appeal, the Harvard court reversed the judgment and remanded the matter to the trial court with instructions to apportion the $50,000 fee award into amounts attributable to services rendered to Harvard before and after the date of the section 998 offer. (Harvard Investment Co. v. Gap Stores, Inc., supra, 156 Cal. App.3d at p. 717.) The Harvard court also instructed the trial court to determine in light of the findings whether Harvard had obtained a judgment "more favorable" than The Gap's offer and, if necessary, to reallocate costs under the provisions of subdivision (c) of section 998. (156 Cal. App.3d at pp. 717-718.)
*1522 The Harvard court reasoned that if only $30,000 of the total $50,000 fee award in favor of Harvard represented the attorney fees incurred by Harvard up to the date of The Gap's offer to compromise, and the balance of $20,000 was excluded from the section 998 "more favorable judgment" analysis, then the $132,000 judgment in favor of Harvard was really for only $112,000, and "only by litigating the case after the offer was Harvard able to generate more fees (damages) and thereby insure a judgment more favorable than The Gap's $125,000 offer." (Harvard Investment Co. v. Gap Stores, Inc., supra, 156 Cal. App.3d at p. 713, italics in original.) As Harvard illustrates, such increasing of a judgment by means of a plaintiff's continuation of the litigation and the concomitant incurring of postoffer "continuing" damages is clearly contrary to the legislative purpose of section 998, which is to encourage litigants to accept reasonable offers to compromise prior to trial. (156 Cal. App.3d at p. 713)

3. The 1994 amendment to subdivision (c)

To provide some guidance as to what constitutes a "more favorable judgment," the Legislature in 1994 amended subdivision (c) of section 998 by adding a new second sentence: "For purposes of this section, a plaintiff in a cause of action not based on tort shall not be deemed to have obtained a more favorable judgment unless the judgment obtained by the plaintiff, exclusive of attorney's fees and costs, exceeds the offer made by the defendant pursuant to this section." (Added by Stats. 1994, ch. 332, § 1 (Sen. Bill No. 1324 (1993-1994 Reg. Sess.), italics added.)
This 1994 amendment to section 998, subdivision (c), was recently construed in Wilson v. Safeway Stores, Inc. (1997) 52 Cal. App.4th 267 [60 Cal. Rptr.2d 532], in which the court held that the language of the amendment limiting its application to "`a cause of action not based on tort'" is unambiguous, and the amendment "excludes `attorney's fees and costs' in calculating the amount of the award in `a cause of action not based on tort.'" (Id. at p. 272, quoting § 998, subd. (c).) In Wilson, the court also held that a sexual harassment action brought under the Fair Employment and Housing Act (Gov. Code, § 12940 et seq.) qualifies as a tort action for purposes of determining what constitutes a "more favorable judgment" under section 998, subdivision (c). (Wilson v. Safeway Stores, Inc., supra, 52 Cal. App.4th at p. 269.)
Although the Wilson decision is one of the principal case authorities upon which Bodell here relies, we note that the Wilson court determined that the *1523 trial court properly added the plaintiff's preoffer attorney fees and costs to the jury's $75,000 verdict in her favor in determining under subdivision (c) of section 998 that the plaintiff had obtained a judgment that was "more favorable" than the defendant's $100,000 offer to compromise. (Wilson v. Safeway Stores, Inc., supra, 52 Cal. App.4th at pp. 269, 271.)

II

Postoffer Prejudgment Interest Awarded to a Plaintiff Under Civil Code Section 3287 Must Be Excluded in Determining Under Section 998, Subdivision (c) Whether the Plaintiff Has Obtained a Judgment "More Favorable" Than the Defendant's Offer
Turning to the issues presented in the instant appeal, we note that section 998 is completely silent on the question of whether an award of prejudgment interest in favor of a plaintiff under Civil Code section 3287, subdivision (a),[12] is to be included or excluded by the court in determining under subdivision (c) of section 998 whether the judgment obtained by the plaintiff is "more favorable" than the defendant's offer to compromise.
We disagree with Bodell's principal contention that the language of the 1994 amendment to subdivision (c) is unambiguous within the context of the instant case, and that the Legislature by its use of the words "exclusive of attorney's fees and costs" intended that every other element of a plaintiff's recovery, including an award of prejudgment interest under Civil Code section 3287, is to be added to the damages award in determining under section 998, subdivision (c), whether the plaintiff obtained a "more favorable judgment." We agree that if the language of a statute is clear and unambiguous, ordinarily there is no need for construction. (Lungren v. Deukmejian, supra, 45 Cal.3d at p. 735.)
However, as we discussed above,[13] the "plain meaning" rule does not prohibit us from determining whether the literal meaning of a statute comports with its purpose. (Lungren v. Deukmejian, supra, 45 Cal.3d at p. 735.) Furthermore, if the terms of the statute provide no definitive answer, we may *1524 resort to extrinsic sources, including the ostensible objects to be achieved and the legislative history. (People v. Coronado, supra, 12 Cal.4th at p. 151.)
The 1994 amendment to section 998, subdivision (c), was contained in Senate Bill No. 1324 (1993-1994 Reg. Sess.). (18 West's Ann. Code Civ. Proc. (1997 pocket pt.) § 998, pp. 118-119.) Our review of the legislative history of the 1994 amendment leads us to conclude that in enacting Senate Bill No. 1324 the Legislature intended to abrogate our decision in Encinitas Plaza Real v. Knight (1989) 209 Cal. App.3d 996 [257 Cal. Rptr. 646] (hereafter, Encinitas Plaza). (See, e.g., Sen. Rules Com., Office of Sen. Floor Analyses, 3d reading analysis of Sen. Bill No. 1324 (1993-1994 Reg. Sess.) as amended May 27, 1995, par. 6 ["The purpose of this bill is to abrogate Encinitas Plaza and to relieve a defendant from having to pay a prevailing plaintiff's attorney's fees pursuant to a contract provision when the plaintiff fails to obtain a better judgment, exclusive of any attorney's fees award, than the defendant's rejected offer."].)
In Encinitas Plaza, which involved a shopping center lessor's action against a lessee for unpaid rent, expenses and late charges, the lessor did not accept the lessee's offer to compromise in the amount of $21,000, and at the end of a second trial following a successful appeal, the trial court awarded damages to the lessor in the amount of only $6,000. (Encinitas Plaza, supra, 209 Cal. App.3d at pp. 998-999.) After entry of judgment the trial court awarded to the prevailing lessor attorney fees in the amount of $39,000. (Id. at p. 999.) The lessee appealed contending the trial court erred in failing to impose the penalties of section 998, subdivision (c), against the lessor. We affirmed and held that an award of attorney fees based on contract is an element of damages, not costs, and thus the trial court had properly added the entire attorney fees award ($39,000) to the much smaller damages award ($6,000) in determining that the resulting judgment in favor of the lessor was more favorable than the lessee's $21,000 offer to compromise, and thus the cost-shifting penalties set forth in section 998, subdivision (c), did not apply. (Encinitas Plaza, supra, 209 Cal. App.3d at p. 1003.)
The Encinitas Plaza case did not involve the questions of whether an award of prejudgment interest to a plaintiff under Civil Code section 3287 should be treated as an element of damages or as a court cost, or whether such an award should be included in a "more favorable judgment" analysis under section 998, subdivision (c). Because the legislative purpose in amending subdivision (c) through enactment of Senate Bill No. 1324 was to abrogate our decision in Encinitas Plaza, we find unpersuasive Bodell's assertion that because the Legislature used the words "exclusive of attorney's *1525 fees and costs" in the 1994 amendment to subdivision (c), we must presume the Legislature intended that every other element of a plaintiff's recovery, including an award of prejudgment interest under Civil Code section 3287, must be added to the trier of fact's damages award in determining whether the judgment obtained by the plaintiff is "more favorable" than the defendant's offer to compromise.
We must determine as a matter of first impression whether the legislative purpose of section 998, subdivision (c), to encourage a plaintiff to accept a defendant's reasonable pretrial offer to compromise is promoted or defeated by adding a trial court's award of prejudgment interest under Civil Code section 3287 to a jury's award of damages in favor of the plaintiff for purposes of determining whether the plaintiff obtained a "more favorable judgment." In making this determination, "`[w]e must select the construction [of section 998, subdivision (c)] that comports most closely with the apparent intent of the Legislature, with a view to promoting rather than defeating the general purpose of the statute, and avoid an interpretation that would lead to absurd consequences.' [Citation.]" (People v. Coronado, supra, 12 Cal.4th at p. 151.) In construing section 998, subdivision (c), we are also mindful of the canon of statutory interpretation that the legislative purpose will not be sacrificed to a literal construction of any part of the statute. (Select Base Materials v. Board of Equal., supra, 51 Cal.2d at p. 645.)
As we discussed above, the clear purpose of section 998 is to encourage the settlement of lawsuits prior to trial, and penalize litigants who fail to accept what, in retrospect, is determined to have been a reasonable settlement offer. (Bank of San Pedro v. Superior Court, supra, 3 Cal.4th at p. 804.)
As we stated in Wisper Corp. v. California Commerce Bank (1996) 49 Cal. App.4th 948 [57 Cal. Rptr.2d 141], an award of prejudgment interest under Civil Code section 3287 "is intended to make the plaintiff whole `for the accrual of wealth which could have been produced during the period of loss.' [Citation.]" (49 Cal. App.4th at p. 958) Thus, prejudgment interest awarded under Civil Code section 3287 is an element of compensatory damages, not a court cost.[14] (See also Flahavan et al., Cal. Practice Guide: Personal Injury (The Rutter Group 1997) ¶ 3:10 rev. #1, 1997.)
*1526 Because prejudgment interest that is recoverable under Civil Code section 3287, like attorney fees and ordinary court costs, continues to accrue until entry of judgment, plaintiffs and their counsel may be tempted to reject a defendant's reasonable offer to compromise, hoping that the additional amount of prejudgment interest that will accrue before the case can be tried, when added to the jury's award, will result in a judgment that is "more favorable" than the rejected statutory offer. Such a result would enable a plaintiff to increase his or her recoverable compensatory damages while increasing the judgment in anticipation of avoiding the penalties set forth in section 998, subdivision (c). In our view, the construction of section 998, subdivision (c), which Bodell urges us to adopt (i.e., that all prejudgment interest awarded under Civil Code section 3287 should be included in the "more favorable judgment" analysis) would defeat the legislative purpose of section 998 to encourage the settlement of lawsuits prior to trial.
However, we are not persuaded by the State's initial contention that subdivision (c) should be interpreted so as to require that the entire award of prejudgment interest be excluded from the analysis.[15] Subdivision (c) does not expressly exclude preoffer prejudgment interest awarded under Civil Code section 3287 (which is a form of compensatory damages, as we discussed above) from the "more favorable judgment" analysis in contract cases.
We hold that in order to promote its legislative purpose of encouraging settlement of civil litigation prior to trial, subdivision (c) of section 998 as amended in 1994 must be construed to require that in a nontort action in which the plaintiff has not accepted a defendant's section 998 offer to compromise, postoffer prejudgment interest awarded to the plaintiff under Civil Code section 3287 be excluded in determining whether the plaintiff has obtained a judgment "more favorable" than the defendant's offer. We further hold that any preoffer prejudgment interest the plaintiff is entitled to recover under Civil Code section 3287 in a nontort action is to be included in determining whether the plaintiff has obtained a "more favorable judgment" within the meaning of subdivision (c) of section 998.
The application of this construction of subdivision (c) to the facts of this case demonstrates, we believe, that such construction comports most closely with the intent of the Legislature. Bodell did not accept the State's section *1527 998 offer to settle Bodell's breach of construction contract action in the amount of $525,000. This offer exceeded by about $128,000 the $397,000 in damages (exclusive of prejudgment interest) the jury later awarded to Bodell. In a posttrial order, the court awarded to Bodell additional compensatory damages in the form of preoffer and postoffer prejudgment interest in the amount of about $147,000 under subdivision (a) of Civil Code section 3287.[16]
Only by persuading the court to add the entire award of prejudgment interest to the damages awarded by the jury was Bodell able to obtain a judgment in the amount of $544,000, which the court determined was "more favorable" than the State's reasonable $525,000 offer to compromise. The State has shown, and Bodell does not dispute, that exclusion of postoffer prejudgment interest, even if calculated in the manner urged by Bodell, would have resulted in a judgment in the amount of $523,000, which would not have been "more favorable" than the State's offer.
We are persuaded that but for the court's erroneous inclusion of the entire prejudgment interest award in its "more favorable judgment" analysis, the court would have been required to impose against Bodell the penalties set forth in subdivision (c) of section 998 as a form of statutory punishment for its failure to accept the State's reasonable offer to compromise. Because Bodell's literal interpretation of the 1994 amendment to subdivision (c), if adopted by this court, would defeat the legislative purpose of section 998 to encourage litigants to accept reasonable settlement offers prior to trial, we must reject it. (Select Base Materials v. Board of Equal., supra, 51 Cal.2d at p. 645.)

DISPOSITION
While otherwise affirming the judgment, we reverse those portions of the judgment and order which award costs to Bodell, and remand this matter to the trial court for further proceedings consistent with this opinion, with instructions to enter an amended judgment (1) awarding to Bodell as the prevailing party under section 1032, subdivision (c) of section 998 (as amended in 1994), and Stiles v. Estate of Ryan, supra, 173 Cal. App.3d at page 1065, only those recoverable costs it incurred before May 15, 1996 (the *1528 date of service of the State's section 998 offer); (2) awarding to the State under the mandatory penalty provisions of subdivision (c) of section 998 the recoverable costs it incurred after that date as set forth in a memorandum of costs to be filed and served by the State according to a schedule to be set by the trial court; and (3) awarding to the State in the court's discretion any other recoverable costs allowed under the discretionary penalty provisions of section 998, subdivision (c). The State shall recover its costs on appeal from Bodell.
Kremer, P.J., and McIntyre, J., concurred.
NOTES
[1]  Subsequent statutory references are to the Code of Civil Procedure unless otherwise specified.

In October 1997, the Legislature amended section 998, subdivision (c). (Sen. Bill No. 73 (1997-1998 Reg. Sess.), Stats. 1997, ch. 892, § 1.) Because this appeal is from a judgment entered in November 1996 and a postjudgment order entered in January 1997, our analysis pertains to subdivision (c) of section 998 as amended in 1994, rather than to the recently amended version of this statute. (§ 3 ["No part of [the Code of Civil Procedure] is retroactive, unless expressly so declared"].)
Thus, all references to section 998 and any of its subdivisions are to these statutes as amended in 1994 unless otherwise specified. However, our analysis of the treatment of an award of Civil Code section 3287, subdivision (a) prejudgment interest under the new version of Code of Civil Procedure section 998, subdivision (c) would be the same as that expressed in this opinion.
[2]  The State does not seek reversal of those portions of the judgment and order awarding prejudgment interest to Bodell.
[3]  Bodell's complaint alleged causes of action for breach of construction contract (first cause of action), breach of the implied covenant of good faith and fair dealing (second cause of action seeking contract damages only), breach of implied warranty of accuracy of plans and specifications (third cause of action), nondisclosure of material facts (fourth cause of action), and quantum meruit (fifth cause of action).
[4]  Of the total jury award of $396,624, $304,100 represented the return of the liquidated damages which the State had withheld from Bodell as a result of the delay in completion of construction, and the balance was an award for additional work performed ($91,341) and interest on late payments ($1,183).
[5]  Bodell submitted the three progress payment requests on the following dates: payment request No. 20 (from which the State withheld $68,000 in liquidated damages) on October 15, 1992; payment request No. 21 (from which the State withheld an additional $124,000 in liquidated damages for a total withholding of $192,000) on November 15, 1992; and payment request No. 22 (from which the State withheld an additional $112,100 in liquidated damages for a total withholding of $304,100) on December 15, 1992.
[6]  Civil Code section 3291 provides in part that if a plaintiff in a personal injury action makes a section 998 offer which the defendant does not timely accept and the plaintiff obtains a more favorable judgment, the judgment "shall" bear interest at 10 percent per annum from the date of the offer.
[7]  Section 1031 (amended by Stats. 1986, ch. 377, § 4, p. 1578) currently provides: "In actions for the recovery of wages for labor performed, where the amount of the demand, exclusive of interest, does not exceed three hundred dollars ($300), the court shall add, as part of the cost, in any judgment recovered by the plaintiff or cross-complainant, an attorney's fee not exceeding 20 percent of the amount recovered."

However, former section 1031 (added by Stats. 1933, ch. 744, § 190, p. 1901) was more expansive in scope and contained provisions entitling a "prevailing party" in municipal and justice court actions to "costs and necessary disbursements." (Former § 1031, subd. (a); see Historical Note, 18A West's Ann. Code Civ. Proc. (1980 ed.) § 1031, pp. 80-81.) It appears the reference to section 1031 in subdivision (a) of section 998 is an outdated reference to former section 1031.
[8]  Section 1032 (added by Stats. 1986, ch. 377, § 6, p. 1578) provides in part: "Except as otherwise expressly provided by statute, a prevailing party is entitled as a matter of right to recover costs in any action or proceeding." (§ 1032, subd. (b), italics added.) Former section 1032 (repealed by Stats. 1986, ch. 377, § 5, p. 1578) was more limited in scope, and provided for recovery of costs in superior court actions. (See 18A West's Ann. Code Civ. Proc., supra, § 1032, p. 83.)

Former section 1032, like former section 1031, did not explain the concept of "prevailing party." In 1986 the statutes governing the recovery of costs were substantially revised. Former section 1031 (discussed ante) was amended, former section 1032 was repealed, and a new section 1032 was added. (7 Witkin, Cal. Procedure (4th ed. 1997) Judgment § 90, p. 620.) The most significant result of the 1986 revisions to much of the chapter of the Code of Civil Procedure which relates to the award of costs (commencing with § 1021 and including §§ 1031 and 1032) is that the allowance of costs now depends on how the prevailing party is determined rather than on the character of the action involved. (7 Witkin, Cal. Procedure, supra, Judgment, § 85, pp. 615-616.) "Thus, the relevant question is whether a party qualifies as `prevailing' under [Code of Civil Procedure section] 1032[, subd.] (a)(4). The type of action in which the party prevailed is of no consequence, unless another statute expressly governs the award of costs in that type of action." (7 Witkin, Cal. Procedure, supra, Judgment § 90, p. 621.)
[9]  Former section 997, the predecessor to section 998, was originally based on statutes 1851, chapter 5, section 390, page 113, and was repealed by Statutes 1971, chapter 1679, section 3, pages 3605-3606. (T.M. Cobb Co. v. Superior Court (1984) 36 Cal.3d 273, 279, fn. 6 [204 Cal. Rptr. 143, 682 P.2d 338].) Former section 997 provided for statutory offers of compromise by defendants only, and stated: "The defendant may, at any time before the trial or judgment, serve upon the plaintiff an offer to allow judgment to be taken against him for the sum or property, or to the effect therein specified. If the plaintiff accept the offer, and give notice thereof within five days, he may file the offer, with proof of notice of acceptance, and the clerk, or the judge where there is no clerk, must thereupon enter judgment accordingly. If the notice of acceptance be not given, the offer is to be deemed withdrawn, and cannot be given in evidence upon the trial; and if the plaintiff fail to obtain a more favorable judgment, he cannot recover costs, but must pay the defendant's costs from the time of the offer." (1 West's Cal. Code Civ. Proc. (1967 ed.) § 997, p. 565; see also Distefano v. Hall (1968) 263 Cal. App.2d 380, 384 [69 Cal. Rptr. 691].)

As our high court explained in T.M. Cobb Co. v. Superior Court, supra, 36 Cal.3d at page 279, footnote 6: "Section 998 was enacted in 1971. (Stats. 1971, ch. 1679, § 3, pp. 3605-3606.) It expanded former section 997's coverage to include statutory offers of compromise by plaintiffs as well as defendants.... The theory and purpose of the statute remained the same. (Compare Distefano, supra, 263 Cal. App.2d at p. 385 [§ 997] with Shain v. City of Albany (1980) 106 Cal. App.3d 294, 298-299 [165 Cal. Rptr. 69] [§ 998].)"
[10]  Subdivision (c) of section 998, as amended in 1994, provides: "(c) If an offer made by a defendant is not accepted and the plaintiff fails to obtain a more favorable judgment, the plaintiff shall not recover his or her costs and shall pay the defendant's costs from the time of the offer. For purposes of this section, a plaintiff in a cause of action not based on tort shall not be deemed to have obtained a more favorable judgment unless the judgment obtained by the plaintiff, exclusive of attorney's fees and costs, exceeds the offer made by the defendant pursuant to this section. In addition, in any action or proceeding other than an eminent domain action, the court, in its discretion, may require the plaintiff to pay the defendant's costs from the date of filing of the complaint and a reasonable sum to cover costs of the services of expert witnesses, who are not regular employees of any party, actually incurred and reasonably necessary in either, or both, the preparation or trial of the case by the defendant."
[11]  The third sentence of section 998, subdivision (c), provides: "In addition, in any action or proceeding other than an eminent domain action, the court, in its discretion, may require the plaintiff to pay the defendant's costs from the date of filing of the complaint and a reasonable sum to cover costs of the services of expert witnesses, who are not regular employees of any party, actually incurred and reasonably necessary in either, or both, the preparation or trial of the case by the defendant."
[12]  Civil Code section 3287, subdivision (a), provides: "(a) Every person who is entitled to recover damages certain, or capable of being made certain by calculation, and the right to recover which is vested in him upon a particular day, is entitled also to recover interest thereon from that day, except during such time as the debtor is prevented by law, or by the act of the creditor from paying the debt. This section is applicable to recovery of damages and interest from any such debtor, including the state or any county, city, city and county, municipal corporation, public district, public agency, or any political subdivision of the state."
[13]  See the Standards on Review part of this opinion.
[14]  In contrast to prejudgment interest awarded under Civil Code section 3287, which as we explained above is a form of compensatory damages, prejudgment interest awarded under Civil Code section 3291 and Code of Civil Procedure section 998 to a plaintiff in a personal injury action in which the defendant fails to obtain a more favorable judgment after failing to accept the plaintiff's offer to compromise, is an item of costs recoverable under Code of Civil Procedure section 1033.5, subdivision (a)(13), which allows as costs "Any other item that is required to be awarded to the prevailing party pursuant to statute as an incident to prevailing in the action at trial or on appeal." (See also Wagy v. Brown (1994) 24 Cal. App.4th 1, 8 (29 Cal. Rptr. 48).)
[15]  As shown by the paucity of argument on this point in the State's reply brief, the State does not strongly defend this contention.
[16]  Although the parties apparently disagree on the date the prejudgment interest should be deemed to have started accruing, and they thus disagree on the amount of such interest the court should have awarded, the State challenges the amount of the award only in the context of demonstrating that Bodell would not have obtained a "more favorable judgment" if the court had excluded postoffer prejudgment interest from the section 998 analysis. Accordingly, we do not address the propriety of the amount of prejudgment interest awarded by the court.
