
25 Cal.2d 930 (1945)
JOHN E. GIBSON, Respondent,
v.
CITY OF SAN DIEGO et al., Appellants.
L. A. No. 19099. 
Supreme Court of California. In Bank.  
Feb. 16, 1945.
 J. F. DuPaul, City Attorney, and Edward H. Law, Deputy City Attorney, for Appellants.
 C. Rupert Linley and Monroe & McInnis for Respondent. *931
 SCHAUER, J.
 In this action for a declaratory judgment both parties seek, on allegations of the complaint which are admitted by the answer, to secure judicial construction of certain provisions of the Charter of the City of San Diego relative to computation of the time and completion of service required for retirement on pension by members of the city fire department. Defendants are the City of San Diego and the three members of the Board of Trustees of the Firemen's Relief and Pension Fund of that city. The provisions (found in section 184(a) of the Charter of the City of San Diego, Stats. 1935, p. 2635) are, in material part, as follows:
 "Whenever any person who shall have been duly appointed ... and shall have served for twenty years or more in the aggregate as a member in any rank or capacity of the regular constituted force [of the Fire Department] ... the Board of Trustees [of the Firemen's Relief and Pension Fund] shall upon the written request of any person, or his guardian, or without such request if it deem it for the good of the service, retire such person from further service in the Fire Department; and from the date of making such order, the service of such person shall cease, and the person so retired shall thereafter during his lifetime be paid ... a yearly pension equal to one-half the amount attached to the rank held by him for one year or more previous to the time of his retirement. ..."
 "In computing the time of service required for retirement, the amount of time served in the United States Army, Navy, Marine Corps or any division thereof in time of war by any member of the Fire Department who have have left said department for the purpose of and entered such service of the United States Army, Navy, Marine Corps or any division thereof immediately thereafter, and who shall have returned to said Fire Department within three months, after having been honorably discharged from said military service, or any member having served as substitute in the San Diego Fire Department, shall have such time counted as part of the aggregate service required for a retirement pension." (Italics added.)
 It appears that plaintiff was appointed a member of the San Diego Fire Department approximately January 18, 1923, and continued in the performance of his duties as such until February 2, 1942, a period of nineteen years and one-half month. Shortly prior to the latter date (the United States *932 then being in a state of war with Germany, Italy, and Japan) plaintiff had become interested in entering the military service and had inquired of his superior officer in the fire department as to what effect entry into the military would have upon his pension rights. The inquiry was transmitted to the office of the City Attorney of the City of San Diego, and that office, on January 19, 1942, by written opinion advised that plaintiff would be entitled to receive a pension as provided by the terms of the San Diego City Charter in case he entered military service, "at the same time as though he had remained on duty with" the fire department. In reliance upon such advice, plaintiff sought and on February 2, 1942, was granted by the proper officials leave of absence from the fire department for the purpose of entering military service.
 On the day that such leave was granted plaintiff entered the United States Navy as a Torpedoman, Second Class, and prior to the time of the institution (on March 28, 1944) of this action had received two promotions. He was still in the Navy, serving honorably, on March 28, 1944. Prior to January 18, 1943 (which date marked the completion of a period of twenty years from the time plaintiff first became a member of the San Diego Fire Department) plaintiff, agreeable to the advice which previously had been given him by the city attorney, applied for his retirement pension from such department. The application was approved by the board of trustees of the pension fund on approximately January 25, 1943, and plaintiff was paid his pension through the month of April, 1943. Thereafter payment was suspended and defendants now claim that plaintiff was at no time entitled to a pension and will not become entitled to one until and unless, within three months after honorable discharge from military service, he "returns" to the San Diego Fire Department, and that the city is entitled to a refund from plaintiff of the pension payments already made to him. No dispute exists as to the amount payable if it be determined that plaintiff's pension rights have accrued.
 Each party moved for judgment upon the pleadings, and the trial court thereupon rendered judgment for plaintiff, whereby it was decreed that plaintiff became entitled to retirement and to a pension upon January 18, 1943, and "is entitled to receive pension as provided for in such [San Diego City] charter for the period since the month of April, *933 1943." From such judgment defendants have appealed, urging that the charter provisions involved (quoted hereinabove) are free from ambiguity, doubt, and uncertainty, are therefore not open to construction by the courts, and must be applied as requiring that those in plaintiff's position in order to receive a pension be honorably discharged from military service and return to the fire department within three months thereafter.
 In support of their position, defendants cite many cases to the effect that "Where the meaning of the statute is plain there is no room or justification for judicial interpretation, and the only function of the court is the application of the enactment to the facts at bar." (Riley v. Robbins (1934), 1 Cal.2d 285, 287 [34 P.2d 715]; see, also, e. g. Norcop v. Jordan (1932), 216 Cal. 764, 770 [17 P.2d 123]; State Bd. of Equalization v. Superior Court (1935), 5 Cal.App.2d 374, 377 [42 P.2d 1076].) Reliance is also placed upon Montgomery v. Board of Administration (1939), 34 Cal.App.2d 514 [93 P.2d 1046, 94 P.2d 610].) In that case another provision of the San Diego City Charter, authorizing the retirement of city employes, other than those in the fire and police departments, upon reaching the age of sixty-two after ten years of continuous service, was before the court. At page 521 of its decision, the District Court of Appeal, in holding that a specific requirement for "continuous service" would not be construed to mean instead "intermittent and interrupted service," said: "Practical construction of a statute can only be resorted to in order to clear up uncertainties and ambiguities. [Citations] ... The provisions of the charter in question not being uncertain, there is no opportunity for practical construction here."
 Defendants argue further that even though a literal construction of the charter provisions as written might work a hardship in cases such as that of plaintiff here, that fact will not justify the construction placed upon the provisions by the trial court. In support of this position they quote general language found in several cases, among them, In re Mitchell (1898), 120 Cal. 384, 386 [52 P. 799], wherein this court stated: "Where the language of a statute is clear, and leaves no doubt as to the legislative intent, there is no room for interpretation, and judicial discretion cannot break its force, however disastrous the consequences may be. ..." And, *934 although conceding the rule that pension statutes will be liberally construed, appellants assert that such rule is not applicable because, as said in Klench v. Pension Fund Commissioners (1926), 79 Cal.App. 171, 187 [249 P. 46], "... these rules of statutory construction, as applied to pension laws, are of no consequence where the language itself of the statute is sufficiently clear or free from obscurity as to reasonably remove all doubt as to its meaning or the legislative intent with respect thereto."
 [1] Plaintiff does not dispute the abstract essence of the rules above enunciated but challenges their applicability to the facts of this case. He urges that the charter provisions are uncertain and incomplete; that they disclose a controlling purpose and object but fail to specifically prescribe the precise rule to be followed in cases such as his, where there has been no discharge, honorable or otherwise, and where the twenty years' service which is the prerequisite to a retirement pension expires while the applicant is still in military service; that therefore it becomes the duty of the courts to construe the provisions and that the construction placed upon them by the trial court is fair and lawful in all respects and carries out the obvious intent and purpose of the law-making authority. We are in accord with this position and with the views leading to such conclusion as helpfully expressed by the learned trial judged in his oral opinion reported in the transcript.
 The construction now sought to be placed upon the charter section by defendants appears to be not such much a literal one as a narrow one and obviously is not the only one to which it is reasonably susceptible. In strict literality the mooted provisions of the charter are so ungrammatically stated as to be ambiguous and well-nigh meaningless without judicial construction. Reduced to the essential elements of its syntax the controlling sentence reads: "In computing the time of service required for retirement, the amount of time served in the United States Army ... shall have such time counted as part of the aggregate service required for a retirement pension." That language is most remarkable in that it fails entirely, read in exact literality, to provide that any person who has served in the Army, Navy, etc., "shall have such time counted" as part of the aggregate required for his pension.
 If we were to construe and apply the section with such complete literality it would confer no benefit whatsoever on *935 any person for service in the armed forces and would have operated to mislead to his detriment every employe of the city of San Diego who, in reliance upon such section and the construction first placed on it by the city attorney, had entered the military service. We are satisfied that it was not the intention of the drafters of the city charter, or of the citizens who adopted it, to insert a clause which was either meaningless or fraudulent in design.
 We are further satisfied that it was the intent and purpose of the citizens of San Diego, in framing and adopting the provisions in question, to encourage city employes to enter the military service during time of war or national emergency, and to protect them in their civil status rights so that they should be wholly relieved by the city from any detriment or penalty in their relationship to it which otherwise would ensue from their patriotic service to the nation. The grammatical ambiguity and the uncertainty of such provisions necessitate our placing a construction upon them and in so doing we are bound by accepted rules of construction to consider the obvious purposes and objects sought to be attained by their adoption and to construe the language used, in so far as it reasonably permits, to the end of giving it vitality and efficacy in the accomplishment of such purposes and objects and fairness in its applications.
 [2] It is a general and well recognized rule that pension provisions shall be liberally construed in favor of the applicant. For instance, Douglas v. Pension Board (1925), 75 Cal.App. 335 [242 P. 756], involved a charter provision that the retired employe should receive a pension "equal to one-half of the salary paid him one year prior to his retirement." The court construed the provision so as to entitle a per diem employe who because of illness had not worked or been paid for all the working days of the year prior to his retirement, to a pension based upon the wages he would have earned had he worked every working day of that year.
 [3] We are of the opinion that a like liberal construction in favor of plaintiff and others so situated should be placed upon the charter provisions now before us. Laws protecting the civil rights of public employes who enter the armed forces in time of war or emergency are favored. National, state, and municipal legislative bodies, and the people themselves by direct vote, have been alert to meet the need for special protective *936 and encouraging measures. In a like progressive spirit both federal and state courts "have kept pace and have evinced a firm intention to take a liberal view" of these enactments "in order that their protective purposes may be fulfilled without undue imposition of constitutional limitations or hindrance through narrow judicial construction." (McCoy v. Board of Supervisors (1941), 18 Cal.2d 193, 196 [114 P.2d 569]; People ex rel. Happell v. Sischo (1943), 23 Cal.2d 478, 486 [144 P.2d 785, 150 A.L.R. 1431].)
 The primary purpose and effect of encouraging city employes to enter the armed forces during time of war could operate to perpetrate fraud unless the indicated reward of credit for such time served actually shall be given in every case wherein the employe has faithfully performed all the obligations upon his part to be performed. Yet if the service-credit provision here is construed to apply only to those persons who have been discharged (whether honorably or otherwise) from the armed forces and who have returned to actual service in the fire department it may exclude from any benefit some who are most deserving of it.
 Under our traditional military scheme we have a relatively small regular Army and Navy with substantial (at least in time of war) reserve corps. The bulk of the actual fighting today, and the direst burdens of warfare, are borne by our citizen soldiers and sailors, the men and women of our reserves. Many of them, at the termination of hostilities or upon earlier removal from active duty status, will not receive discharges, honorable or otherwise, unless the legal structure of our forces shall be radically changed. They will simply be transferred from an active duty status to an inactive (or perhaps retired) status in the reserve corps. (10 U.S.C.A. (1944 Supp.)  358, 424; 34 U.S.C.A. (1944 Supp.)  853c, 853d.) It does not seem reasonable that the framers of the charter provisions in question intended to exclude employes in such a category from the benefits of credit for their honorable service.
 Neither does any sound reason appear why an employe, who while in the military service completes the period required for city retirement, should be compelled to wait until he has left the military service before he may collect that to which he is otherwise entitled. The city cannot exact any further service from him. If the time of his service in the armed forces is to be counted and if it plus the time of his service to the city aggregate the time which entitles him to the *937 pension then he has a vested right to collect it. As observed by this court in O'Dea v. Cook (1917), 176 Cal. 659, 661 [169 P. 366], "A pension such as this law contemplates is not a gratuity or a gift. ... [W]here, as here, services are rendered under such a pension statute, the pension provisions become a part of the contemplated compensation for those services and so in a sense a part of the contract of employment itself." And in Klench v. Pension Fund Commissioners (1926), supra, 79 Cal.App. 171, 185, the court said: "A pension is a gratuity only where it is granted for services previously rendered which, at the time they were rendered, gave rise to no legal obligation. [Citations] ... And herein lies an important distinction between pension laws which, like those we now have before us, provide for pensions for services performed for the government or disabilities occurring while rendering such services after the law has been passed, and a pension system designed to care for or reward soldiers for disabilities suffered or services rendered in the past. ..."
 To deny the completely earned pension benefit to those who continue on active military duty would tend to discourage rather than encourage such service--directly contrary to one of the primary purposes of the charter provision. Furthermore, to sustain the defendants in their claim of a right to postpone actual payment of the earned pension until discharge of the employe-veteran from military service and his "return" to the fire department might well operate to deprive the employe and his family altogether of the pension benefit. If he should be kept on active military duty after his right to the pension had otherwise matured (as is the case here) and if he should die before he had been "discharged" and had "returned" to the fire department, the position taken by the city in its argument here, if sustained, would forever preclude such employe and his heirs from any recovery on the pension.
 There is apparent no purpose to be served by requiring any employe who has completed his period of service so as to be fully entitled to a pension to return to the fire department. The fire department has no right to his return because it has no right to further service from him. He has fully earned his pension. The phrase "and who shall have returned to said Fire Department within three months, after having been honorably discharged from said military service" is to be construed, therefore, as applying only to those whose "time *938 of service required for retirement" has not been completed at time of discharge or release from active duty status.
 For the reasons hereinabove stated the judgment appealed from is affirmed.
 Gibson, C.J., Shenk, J., Carter, J., Traynor, J., and Spence, J., concurred.
