
188 Cal.App.3d 1421 (1987)
234 Cal. Rptr. 117
JOHN W. PETERS, Plaintiff and Appellant,
v.
THE STATE OF CALIFORNIA, Defendant and Respondent.
Docket No. D004193.
Court of Appeals of California, Fourth District, Division One.
January 28, 1987.
*1423 COUNSEL
John C. Jacoby for Plaintiff and Appellant.
Talmadge R. Jones, Christine A. Bologna and Tamara J. Pierson for Defendant and Respondent.
OPINION
LEWIS, J.
Dr. John Peters appeals from a judgment on the pleadings entered against him in his action for declaratory relief against the State of California. Dr. Peters contends that Government Code section 19775.1 which entitles a state employee to compensation "for the first 30 calendar days of active duty served" on military leave means that he is entitled to be paid for 30 times 8 hours or 240 hours per year. We agree with the interpretation of the statute by the State of California and the trial court to the effect that the employee is entitled to his regular pay that he would otherwise have received during a period of 30 calendar days and we therefore affirm the judgment.
Dr. Peters is employed full time by the State of California, Department of Health Services, as a medical consultant. He also serves as a colonel in the United States Air Force Reserve. During fiscal year 1981 and 1982 he took 390 hours of military leave and was paid his regular state salary in addition to the military pay for all 390 hours. During the fiscal year 1982-1983 he took 180 hours on military leave and was paid for all 180 hours. In May 1983 respondent State of California realized its error and notified Dr. Peters that the maximum paid military leave entitlement under the statute was 172 hours per fiscal year. Dr. Peters was notified that he would be required to repay the overpayments totalling 226 hours by having sums deducted in monthly installments from his state salary. The deductions were not actually instituted pending the outcome of this litigation.
Dr. Peters's first amended complaint sought a temporary restraining order, a preliminary injunction and a permanent injunction to prevent the State of California from refusing to pay the 240 hours of disputed military leave and to prevent the State of California from withholding any overpayment of wages during the period 1981-1984 from Dr. Peters's state salary. The amended complaint also sought a declaration interpreting Government Code sections 19775.1 and 19775.2. The State of California demurred to the first amended complaint, alleging that the complaint did not state facts sufficient to constitute a cause of action and that declaratory relief was not necessary *1424 or proper, and requested the court to dismiss the complaint without leave to amend. At the hearing on the demurrer on October 4, 1985, the court heard oral argument and granted judgment on the pleadings to respondent State of California. Dr. Peters contends on appeal that the trial court was premature in the granting of the judgment on the pleadings because the ultimate legal issue was not before the court, and that the court erred in its interpretation of Government Code sections 19775, 19775.1 and 19775.2.

I
(1) We first address the contention that the lower court acted prematurely in addressing the ultimate legal issue and granting judgment on the pleadings. Respondent State of California had not moved for judgment on the pleadings. However, during the hearing on the demurrer the court inquired "why can't the Court, as a matter of interpretation, interpret this to be a judgment on the pleadings and give a judgment one way or the other on the pleadings or deny it as the case may be? Why can't the Court do that? It's done all the time.'" Counsel for Dr. Peters replied "The Court can do that. I don't want to say it can't, and the ruling would be welcome" and "In fact, that's one of my more cogent arguments that this is a matter for the Courts; that this interpretation of the statute is a matter for the Courts that would dispose of the matter, your Honor, if you want to make that ruling now." Dr. Peters cannot submit a matter for determination by the lower court and subsequently contend on appeal that the matter was beyond the scope of the issues framed by the pleadings. (See Estate of Armstrong (1966) 241 Cal. App.2d 1, 7 [50 Cal. Rptr. 339].) Furthermore, a motion for a judgment on the pleadings and a general demurrer are in effect substantially similar and the same rules apply to ruling on such a motion as applied to ruling on a demurrer (Mathews v. State of California ex rel. Dept. of Transportation (1978) 82 Cal. App.3d 116, 119 [145 Cal. Rptr. 443]), and an appeal from a judgment on the pleadings is reviewed in the same way as a judgment of dismissal following the sustaining of a demurrer. (Gill v. Curtis Publishing Co. (1952) 38 Cal.2d 273, 275 [239 P.2d 630].) The same result could have been obtained by the trial court sustaining the demurrer without leave to amend. Dr. Peters argues Moore v. California Minerals etc. Corp. (1953) 115 Cal. App.2d 834 [252 P.2d 1005], as supportive of his assertion that it was error for the trial court to grant the judgment on the pleadings when no such motion was made. In Moore no motion of any kind was pending before the court and the trial had begun when the court granted sua sponte judgment on the pleadings. Surprise was involved and a lack of opportunity to be heard on the action being considered by the court. No such defects exist here. Appellant was on notice that in a hearing on a demurrer the demurrer to the complaint might be sustained without leave to amend which would result in a judgment being entered against the plaintiff. It was not error for the trial *1425 court to consider the legal issue as though it had been framed by a motion for judgment on the pleadings, and even if it were error, such error would have been invited by the appellant.

II
(2) (See fn. 1.), (3a) We next consider whether the trial court erred in its interpretation of the Government Code.[1]
Government Code section 19775 et seq. are the corollary to Military and Veterans Code sections 395.1 and 395.2 relating generally to reinstatement to government employment after termination of active military service. Government Code section 19775.1 states: "An employee who is granted a short-term military leave of absence for military duty ordered for purposes of active military training, encampment, naval cruises, special exercises, or like activity, but not for inactive duty such as scheduled reserve drill periods, and who for a period of not less than one year immediately prior to the effective date of active duty has had continuous state service as defined by Department of Personnel Administration rule which is not broken by a permanent separation, or who has had continuous state service immediately prior to the effective date of active duty not broken by a permanent separation and sufficient recognized military service which need not be continuous to equal one year shall be entitled to receive his or her salary or compensation for the first 30 calendar days of active duty served during the absence.
"An employee who is granted emergency military leave under the provisions of Section 19773, shall receive his or her salary or compensation as a state employee while going to, engaging in, and returning from the duty. The employee shall not receive his or her salary or compensation for more than 30 days each time he or she is granted the emergency military leave."
The State of California has taken the position that the plain meaning of this statute is that the state employee is entitled to his regular salary or *1426 compensation during a period of the first 30 calendar days of active military duty served during the short-term leave of absence. This means, in the interpretation of the state, that the employee is entitled to the pay for the normal working time during those calendar days based on his regular scheme of compensation. Specifically here, a state employee's work week is 40 hours a week. (Gov. Code, § 19851.) Some government employees, including the appellant Dr. Peters, work that 40 hours in four 10-hour days per week pursuant to Government Code section 19852. The State of California's position is that in some 30-day periods there are 21 working days and in half of the 30-day periods there are 22 working days, an average of 21.5 working days per 30-day period. For an employee who works the normal 8-hour day, 5 days a week, 21.5 working days is 172 hours. It is the position of the State of California that that is what an employee paid by the hour is entitled to be paid for under the statute: 172 hours. Dr. Peters contends that he is entitled to 240 hours of pay which he derives by multiplying 30 days by 8 hours. To follow his argument, it is not clear why he does not urge that he is entitled to 300 hours, that is, 30 days times 10 hours per day since he works four 10-hour days per week.
(4) It is a "well-established principle of statutory interpretation that if no ambiguity, uncertainty, or doubt about the meaning of a statute appears, the provision is to be applied according to its terms without further judicial construction. [Citation.]" (In re Atiles (1983) 33 Cal.3d 805, 811 [191 Cal. Rptr. 452, 662 P.2d 910].) (3b) The plain English language meaning and interpretation of the statute providing compensation for the first 30 calendar days of active duty and the apparently obvious intention of the statute seems clearly to have been to provide the employee the same compensation he would have received from his state employment during those 30 calendar days had he not been on active military duty. By plain logic and common sense, that would mean the number of hours the employee would have ordinarily worked during those first 30 calendar days. This would be true whether the employee is paid by the day, week or month or by the hour. The interpretation and policy of the State of California and the Department of Personnel Administration and State Personnel Board to that same effect are consistent with the plain English language meaning and interpretation of the statute. The contention by appellant that a state employee is entitled to be paid 30 times the number of hours in a regular work day simply has no support in logic or the language of the statute. We note that the wording of the statute refers to a single absence for military duty, "shall be entitled to receive his or her salary or compensation for the first 30 calendar days of active duty served during the absence." (Gov. Code, § 19775.1, italics added.) The interpretation that the number of working hours in an average 30-day period whether the employee works five 8-hour days or four 10-hour days is the amount of compensation to which he is entitled seems to be *1427 exactly the right interpretation. If the Legislature had intended that the state employee be entitled to pay for 30 working days, the Legislature is perfectly capable of saying so and the use of the term "30 calendar days" requires exactly the opposite result from the one appellant urges. There was no error by the trial court in this regard.
(5) There was no requirement for the trial court to enter any form of declaratory judgment where the controversy can be determined as a matter of law. A complaint for declaratory relief is subject to demurrer without leave to amend under such circumstances (California State Employees' Assn. v. Flournoy (1973) 32 Cal. App.3d 219, 240-241 [108 Cal. Rptr. 251]) and the same rule applies to the disposition of the case by a judgment on the pleadings.
The judgment of the trial court is affirmed.
Butler, Acting P.J., and Todd, J., concurred.
NOTES
[1]  We do not consider exhibits I, II and III to Dr. Peters's opening brief (the memorandum of understanding between the County of San Diego and San Diego County Employees Association, the Los Angeles County Personnel Manual and a letter and declaration of Stuart Brody), since these documents are not part of the record on appeal. The Brody letter and declaration were specifically excluded from consideration by the trial court. We note that Dr. Peters argues that the lower court erred by considering extrinsic evidence. Dr. Peters argues that the court considered respondent's answer in ruling on the demurrer and granting the judgment on the pleadings and considered matters attached to the answer relating to the policy of the State of California and its interpretation of the relevant statutes. However, there is no reference in the record to support the allegation that the trial court looked to anything outside the complaint and the demurrer and the documents filed in support and opposition thereof in reaching its conclusion. We therefore find no merit in this assertion.
