Plaintiff sought to recover $6,781.69 alleged to have been improperly paid by plaintiff to defendant as interest on certain overpayments of franchise tax refunded to defendant for the income years 1942, 1943, and 1944. The propriety of the refund of the tax overpayments is not questioned, and it is only the propriety of the payment of a portion of the interest on the refund that must be determined. The trial court upheld plaintiff’s claims in the light of the statutory provisions and rendered judgment in its favor. Defendant appeals contending: (1) that the court both misconstrued the statute and applied it retroactively in disregard of constitutional limitations; and (2) that in any event, plaintiff’s recovery is barred by the statute of limitations. For the reasons hereinafter stated, we have concluded that defendant’s contentions cannot be sustained.
There is no dispute as to the facts. Defendant paid its corporate franchise taxes as computed for the income years 1942, 1943, and 1944. Prior to those years the Franchise Tax Act provided that a taxpayer could elect to claim a deduction for amortization of emergency facilities under regulations prescribed by the Franchise Tax Commissioner. (Bank and Corporations Franchise Tax Act, § 8, subd. f; Stats. 1929, eh. 13, as amended; now Rev. & Tax. Code, § 24121h.) Pursuant to such authority, the Franchise Tax Commissioner on November 11, 1945, issued a regulation providing that the election to accelerate the amortization of emergency facilities should be made by filing a statement of such election within certain *479 prescribed time limits; and that upon such election the taxpayer could file a claim for refund and the tax liability would be recomputed to give effect to the revised amortization deduction. (FTA 8 (f) No. 1.) Accordingly, defendant duly filed a statement of its election to accelerate the amortization for the income years in question, and within the time allowed defendant then filed its claims for refunds of franchise taxes overpaid for the income years 1942, 1943, and 1944. After some appropriate adjustments, the commissioner determined the amount of refund and mailed warrants to defendant on August 18, 1948. These warrants included the amount of the overpayments plus interest at 6 per cent per annum computed from the dates of the respective overpayments to a time shortly before August 18, 1948. Thereafter, the commissioner determined that interest in excess of that properly due had been paid to defendant, and demand was made on defendant for a return of such excess. Defendant refused, and this action was commenced on June 7, 1951.
At the time defendant paid its franchise tax for the years in question and until July 10,1947, section 27 (c) of the Bank and Corporation Franchise Tax Act (now Rev. & Tax. Code, § 26080) provided: “Interest shall be allowed and paid upon any overpayment of any tax, if the overpayment was not made because of an error or mistake on the part of the taxpayer, at the rate of 6 pereentuin per annum. ...” (Emphasis added.) In 1947 the statute was amended to provide: “Interest shall be allowed and paid upon any overpayment of any tax, if the overpayment was made because of am, error or mistake on the part of the Commissioner, at the rate of 6 percentum per annum. ...” (Emphasis added.) The amendment went into effect July 10, 1947, and remained in effect until after the refund warrants were mailed to defendant. Under its election to accelerate amortization, defendant had overpaid its taxes for the years in question. These overpayments were not due to any error or mistake by either defendant or the commissioner. Under section 27 (c) as it read when defendant filed its claims for refunds, defendant was entitled to interest because there had been no error or mistake on its part in making the overpayments. However, for the period of time subsequent to July 9, 1947, there was no statute authorizing the payment of interest on refunds for overpayment of taxes unless such overpayment resulted from error or mistake of the commissioner. Thus, the principal question for determination is whether the 1947 amendment operated from *480 its effective date to prevent the running of interest thereafter on defendant’s overpayments made prior thereto. The trial court held that the amendment did so operate, and judgment accordingly was entered for plaintiff.
The liability of the state to pay interest is “purely statutory.”
(Gregory
v.
State,
Defendant argues that it is entitled to retain the interest paid for the period
subsequent
to the effective date of the 1947 amendment because its overpayments of tax were made
prior
to that date and the amendment should apply only to overpayments made
after
that date. In support of its position defendant introduced, over plaintiff’s objections as to relevancy, the testimony of certain employees of the franchise tax office indicating that defendant’s interpretation of the amendment was their understanding of the Legislature’s intent, and that their administration of the amendment was in accord therewith until the practice was changed upon advice of the attorney general following the decision in
Gregory
v.
State
(1948),
supra,
Contrary to defendant’s position, the trial court’s conclusion involves no retroactive application of the 1947
*481
amendment in an unconstitutional impairment of vested contractual rights. No element of contract is present here, either implied
(Gregory
v.
State, supra,
In
Southern Service Co., Ltd.
v.
County of Los Angeles, supra,
While an interest obligation based upon contract may resist change under constitutional guarantees, a statutory interest right for a particular period depends upon the law in effect at that time. This has been the settled law in this state for many years.
(White
v.
Lyons,
Defendant finally contends that plaintiff’s action is barred by the two-year statute of limitations. (Code Civ. Proc., § 339, subd. 1.) It asserts that if plaintiff’s payment of interest on the overpayments of tax was improper because without statutory authority, then plaintiff’s cause of action arose as of the date of the refunds, August 18, 1948, and the period of limitations applicable for enforcement of defendant’s obligation to repay such illegally held funds, implied by law, was two years. This action was commenced on June 7, 1951. But in the light of the record, it appears that the proper statute of limitations is the three-year period governing an action for relief on the ground of “mistake” (Code Civ. Proc., § 338, subd. 4), and plaintiff’s action was therefore timely filed.
The nature of the right sued upon and not the form of action nor the relief demanded determines the applicability of the particular statute of limitations.
(Maguire
v.
Hibernia S. & L. Soc.,
Defendant argues that while said mistake of law may have caused the improper interest payments, such mistake is merely incidental to plaintiff’s cause of action as one for money had and received, that no other ground of relief was available to plaintiff, and that therefore the two-year statute of limitations applies. In support of its argument, defendant cites such out-of-state cases as
McFarland
v.
Stillwater County,
While as a general rule a mistake of law is of no legal consequence, just as ignorance of the law is no excuse, it has been said that the recovery of public moneys paid out through mistake by the state or an agency of government should be permitted “in many instances where, if paid out by an individual or by a private corporation [they] could
*484
not be.”
(Aebli
v.
Board of Education,
The judgment is affirmed.
Gibson, C. J., Shenk, J., Carter, J., Traynor, J., Schauer, J., and McComb, J., concurred.
