This is an appeal from a judgment of the Superior Court of San Bernardino County denying a petition for a writ of mandate to compel respondent tax collector to make certain tax records regularly available for inspection by petitioner.
Appellant-petitioner is a citizen and taxpayer in San Bernardino County. One of his business endeavors is to locate parcels of land upon which the secured real property taxes are delinquent. He then contacts the owner of the land and endeavors to purchase the owner’s interest. After paying off the tax liens, he normally resells the parcel for a profit.
Appellant has for several years ascertained the identity of parcels burdened by back-tax liens by examining the delinquent tax abstracts, which are maintained by the tax collector and are under his exclusive custody, care, and control.
In his complaint, appellant alleged that in 1963 the tax collector refused, for a period of over four months, to let members of the public (except for representatives of title companies) examine the delinquent tax abstracts. Thereafter, members of the public were permitted to examine these records during one hour in the morning and one hour in the afternoon of each business day of the tax collector’s office. Again, examiners representing title companies were not so limited.1
*669Appellant made a demand of the tax collector for greater access to the delinquent tax abstracts, which demand was rejected. The trial court ordered an alternative writ of mandate to issue, and a hearing was had on the order to show cause.
The tax collector’s testimony reveals that he originally denied appellant access to examine the records because appellant’s actions had interfered with the normal conduct of business of the office. The interference cited, however, was not physical interference—not interruptions or inconvenience by appellant being in the office or monopolizing the record books. Rather it was that letters appellant regularly sent to owners of tax-delinquent parcels frightened the owners into believing their property was about to be sold at public auction. The recipients of these letters often telephoned the tax collector’s office with frantic inquiries, imposing a burden on his staff which he wished to eliminate.
The tax collector was asked if appellant’s practice of engaging in extended searches of the records was, itself, directly interfering with the office. The tax collector evaded an unequivocal answer. He admitted that the effect appellant’s letters to landowners were having on the owners was the primary reason for denying Mm access to the records. He also admitted that few persons asked to make extended searches of the delinquent tax abstracts.
Testimony at the hearing also disclosed that a special desk in the office was set aside for persons making extensive searches in order to prevent crowding at the front counter of the office. The tax collector testified that at certain periods of the year his office was extremely busy and that at particular times, when the delinquent tax abstract records were being posted with new entries and when the county auditor had possession of these records, they would be unavailable for examination by all members of the public.
The trial judge concluded from the testimony at the hearing that, under the applicable law, the regulations which permitted appellant to examine the records only two hours a day were invalid. Rather than order the peremptory writ, the judge, exercising claimed discretionary powers, filed a memorandum in which he stated that he would deny the petition for writ of mandate if the tax collector, within 30 days, submitted reasonable amended regulations governing exami*670nation of the records by the public. The memorandum stated that the regulations would be valid if they permitted examination during all hours and all days when the office was open, except at times when examination would disrupt the orderly functioning of the office.
The tax collector drafted amended regulations, and, after they were modified once again at the trial judge’s suggestion, these were approved by the court. Judgment denying the petition for writ of mandate was then entered.
The tax collector’s “Second Amended ‘Procedures For Control And Use of Delinquent Abstracts’ ” provides as follows: Information about one or two parcels will be furnished at all times by the tax collector’s staff. The delinquent abstract books themselves will be open to public inspection on working days from 8 :30 a.m. to 4:30 p.m.2 Use of the delinquent tax abstracts will be permitted only at a particular desk and only when space at that desk is available, provided, however, that the tax collector undertakes to provide a desk or table for use by the public. A special location is set aside for title company representatives.
The language under most vigorous attack on appeal states that, “in order to maintain the functions of the Tax Collector’s Redemption Division, as required by law, the use of the Abstract books may be restricted at the following times, as deemed necessary:
“1) During the month [s] of July and August and until such times as the posting of the past year’s sales and removal of past year’s redemptions have been completed.
“2) During the rush peak work load collection periods immediately preceding and following the December 10th and April 10th delinquent dates as established by State law.
“3) Immediately preceding the peak work load periods created by Tax Sales at Public Auction of Tax Deeded Lands. ’ ’ (Italics added.)
The first issue is procedural: Did the trial court properly rest its denial of the writ of mandate on facts (i.e., the new regulations) arising after the complaint and answer were filed? In our opinion, the trial court’s actions were proper and commendable.
It has been held that a judge hearing a mandamus proceeding may properly consider, in deciding whether to issue a peremptory writ, all relevant evidence, including facts *671not existing until after the petition for writ of mandate was filed. This is so because mandamus is an action where equitable principles apply (Allen v. Los Angeles County Dist. Council of Carpenters, 51 Cal.2d 805, 811 [337 P.2d 457], cert. den. 361 U.S. 936 [4 L.Ed.2d 356, 80 S.Ct. 376]; Dare v. Board of Medical Examiners, 21 Cal.2d 790, 795 [136 P.2d 304]), and because issuance of the writ is frequently a matter for the court’s discretion (Dowell v. Superior Court, 47 Cal.2d 483, 486-487 [304 P.2d 1009]; compare Palmer v. Fox, 118 Cal.App.2d 453,456-457 [258 P.2d 30]).
Decisions are to be found in which mandamus relief was denied, even though petitioner’s rights may have been violated, because facts arising after the petition was filed prevented the writ from serving any useful purpose. (Stracke v. Farquar, 20 Cal.2d 82 [124 P.2d 9]; Bender v. Superior Court, 152 Cal.App.2d 817 [314 P.2d 54].) Other decisions hold that if the respondent has complied with the petitioner’s demands after issuance of the alternative writ, the writ has accomplished the purpose of the mandamus proceedings and the petition should be dismissed as moot. (Thornton v. Hoge, 84 Cal. 231 [23 P. 1112]; Muller v. Municipal Court, 146 Cal.App.2d 231 [303 P.2d 775]; Mitchell v. Warren, 95 Cal.App.2d 594 [213 P.2d 413].) The rationale is, “No purpose would be served in directing the doing of that which has already been done.” (Muller v. Municipal Court, supra, at p. 232; see also Crestlawn Memorial Park Assn. v. Sobieski, 210 Cal.App.2d 43, 47 [26 Cal.Rptr. 421].) In George v. Beaty, 85 Cal.App. 525 [260 P. 386], the court said: “ [T]he remedy of mandamus will not be employed where the respondents show that they are willing to perform the duty without the coercion of the writ. . . . “Mandamus will not issue to compel the doing of an act which has already been done, or which the respondent is willing to do without coercion”. . . .’ ” (P. 529.) “ [W]here the return to the alternative writ shows a compliance therewith, the petition will be dismissed.” (P. 532.)
It is obvious that these procedural rules require the court in mandamus proceedings to apprise itself of facts that arise after pleading which render the dispute moot or make the remedy useless.
American Distilling Co. v. City Council of City of Sausalito, 34 Cal.2d 660, 666 [212 P.2d 704, 18 A.L.R.2d 1247], is distinguishable. There the court said: “The petitioner’s right to [mandamus] relief is determinable by the facts as they *672existed at the time the petition was filed [citation]; and unless in the meantime the law defining the legal duty has been changed, the preemptory [sic] writ should follow the terms of the alternative writ. ’ ’
In that ease the city council had concluded that owners of one-half of the value of territory proposed to be annexed had not protested annexation and it approved the annexation without further hearings. Certain federally owned land was within the parcel sought to be annexed, and at the time of the protest it was assessed at zero dollars. Mandamus was sought to compel the city council to make a finding that owners of half the value of the land had protested, which was true unless the federal land could be valued.
The court held that the city council was required by statute to value the land according to the last equalized assessment roll. The language quoted above was employed to denote that any later-made assessments were irrelevant to the dispute.3 The opinion nowhere indicates that the trial court was required to ignore other facts arising after the petition was filed which would have mooted the case or which would have demonstrated that the city council was willing to make the finding demanded without coercion of the writ.
Rittersbacher v. Board of Supervisors, 220 Cal. 535 [32 P.2d 135], is also distinguishable. It concerned a petition for writ of mandate to compel respondent board of supervisors to cancel an assessment levied against a certain parcel of land. A general demurrer was interposed, stating that petitioner had not alleged a discriminatory assessment procedure. The court said, “ The real question is whether the petitions in mandamus state facts entitling the plaintiffs to any relief; and this question must be determined on the facts existing at the time the petitions for the writs were filed as disclosed by the allegations thereof.” (Italicsadded.) (P.541.)
The import of the italicized language is that in passing on-a demurrer, the court should ignore all allegations of facts not yet existing, that is, which are mere predictions. For example, an allegation that petitioner believes respondent will at sometime in the future fail to perform official duty does not state a cause of action. This language in Rittersbacher must be confined to the demurrer situation. Once the court reaches the *673merits of the ease, it should consider all relevant facts, regardless of when they came into existence.4 Therefore, the amended regulations were properly considered by the trial court.
The substantive issues raised in this case require us to construe two statutes that provide for public examination of official documents. Section Í227 of the Government Code reads: “The public records and other matters in the office of any officer, except as otherwise provided, are at all times during office hours open to public inspection of any citizens of the State.” Code of Civil Procedure, section 1892, provides: “Every citizen has a right to inspect and take a copy of any public writing of this State, except as otherwise expressly provided by statute. ’ ’
Appellant first contends that these statutes are absolute in operation—that if, as is conceded here, the records involved are of the type which the statutes authorize the public to inspect, under no circumstances can inspection be denied.
This contention is untenable. Occasions will frequently arise when a public document is needed by a public official in order to perform his official duties. Testimony in this case demonstrated that at times the county auditor must have possession of the delinquent tax abstracts in order to draw up county financial reports; at other times members of the tax collector’s staff must have use of the records for posting new entries and removing outdated ones. We cannot construe the statutes to give a member of the public priority over county officers in the use of official records. Appellant’s construction of the statutes would require the auditor or tax collector to suspend official duties while appellant examines the books in aid of his private business. This interpretation must be rejected.
It is a settled principle of statutory interpretation that language of a statute should not be given a literal meaning if doing so would result in absurd consequences which the Legislature did not intend.5 (Citizens Utilities Co. *674v. Superior Court, 59 Cal 2d 805, 811 [31 Cal.Rptr. 316, 382 P.2d 356]; Interinsurance Exchange v. Ohio Cas. Ins. Co., 58 Cal.2d 142, 153 [23 Cal.Rptr. 592, 373 P.2d 640]; American Industrial Sales Corp. v. Airscope, Inc., 44 Cal.2d 393, 398 [282 P.2d 504, 49 A.L.R.2d 1344] ; Dempsey v. Market Street Ry. Co., 23 Cal.2d 110,113 [142 P2d 929].)
Although a court may not insert qualifying provisions into a statute not intended by the Legislature and may not rewrite a statute to conform to an assumed legislative intent not apparent (People v. One 1940 Ford V-8 Coupe, 36 Cal.2d 471, 475 [224 P.2d 677]), “words of general import may be given a contracted meaning dependent upon the connection in which they are employed, and considering the general purpose or scheme entertained by the legislature in passing the statute, and . . . words will not be given their literal meaning when to do so would evidently carry the operation of the enactment far beyond the legislative intent and thereby make its provisions apply to transactions never contemplated by the legislative body. ...” (People v. Davenport, 13 Cal.2d 681, 685 [91 P.2d 892], quoted in Farnsworth v. Nevada-Cal Management, 188 Cal.App.2d 382, 387 [10 Cal.Rptr. 531].)
The courts have not hesitated, when legislative intent is clear, to find by implication provisions in a statute which are not within the scope of the statutory language taken literally. (Cf. In re Cregler, 56 Cal.2d 308, 312 [14 Cal.Rptr. 289, 363 P.2d 305] [waiting for a bus at depot not the kind of “loitering” proscribed by statute]; Kasunich v. Kraft, 201 Cal. App.2d 177 [19 Cal.Rptr. 872].) In particular, courts of several jurisdictions have construed statutes providing for public inspection of documents, absolute on their face, to exempt inspection under circumstances in which it would interfere with the operation of public offices.
In Bell v. Commonwealth Title Ins. Co., 189 U.S. 131 [47 L.Ed. 741, 23 S.Ct. 569], a federal statute provided that “All books in the offices of the clerks of the Circuit and District Courts, containing the docket or minute of the judgments, or decrees thereof, shall, during office hours, be open to the inspection of any person desiring to examine the same, without any fees or charge therefor.” Another statute required the clerks to index the records and provided that “such indices and records shall at all times be open to the inspection and examination of the public.” (Italics added.) (P. 131.) The decree ordered examination be allowed but stated that “such inspection and examination shall be made only at such times and under such circumstances as will not *675interfere with the respondent or his assistants in the discharge of their duties or with the exercise of the right of other persons to have access to said indices and cross in-dices.” (189 U.S. at p. 132.)
In affirming, the United States Supreme Court said that a member of the public “cannot interfere with the clerk or his assistants in the discharge of their duties, or with the equal rights of other persons to such inspection and examination.
. . . Under this decree the clerk, as custodian, can make such reasonable regulations as will secure to him and his assistants full use of all the books and records of his office—which, of course, is a primary matter to be considered—and also will guard against any tampering with or injury to those books and records, and at the same time give to the plaintiff and others access to the indices.” (189 U.S. at p. 133.)
In Direct-Mail Service v. Registrar of Motor Vehicles, 296 Mass. 353 [5 N.E.2d 545, 108 A.L.R. 1391], the statute provided that “records of the registrar ‘shall be open to the inspection of any person during reasonable business hours.’ ” (P. 546.) The court stated that the right to inspect at such hours would be circumscribed by physical limitations such as lack of space and that persons examining records could be prohibited from monopolizing them or from interfering unduly with the work of the office. “ [T]he applicant must submit,” said the court, “to such reasonable supervision on the part of the custodian as will guard the safety of the records and secure equal opportunity for all.” (5 N.E.2d at p. 547.)
The statute at issue in Fuller v. State, 154 Fla. 368 [17 So.2d 607], provided, “All state, county and municipal records shall at all times be open for personal inspection of any citizen of Florida, and those in charge of such records shall not refuse this privilege to any citizen.” (P. 607.) Although the statute was absolute in its language, the court construing it stated: “There is always a field for the operation of reason and charity in such controversies in a way to protect the municipality and accommodate the one who desires the inspection if the parties are disposed to find it.” (P. 608.) The court said the custodian could regulate inspection to safeguard the records. (See also State ex rel. Eggers v. Brown, 345 Mo. 430 [134 S.W.2d 28, 32-33].)
In Whorton v. Gaspard, 239 Ark. 715 [393 S.W.2d 773], the statute provided only that records were subject to inspection by interested persons. The court said: “ ‘Without doubt, rea*676sonable restrictions and conditions may be imposed with respect to the right to use public records. Even in the absence o£ any specific restrictions, the right implies that those exercising it shall not take possession of the registry or monopolize the record books so as unduly to interfere with the work of the office or with the exercise of the right of others, and that-they shall submit to such reasonable supervision on the part of the custodian as will guard the safety of the records and secure equal opportunity for all.’ ” (393 S.W.2d at pp. 774-775; accord, State ex rel. Halloran v. McGrath, 104 Mont. 490 [67 P.2d 838, 841-842], See also State ex rel. Louisiana Title Ins. Co. v. Brewer, 147 Ohio St. 161 [70 N.E.2d 265]; State v. Harrison, 130 W.Va. 246 [43 S.E.2d 214, 218-219].)
The question here seems to be one of first impression in the California appellate courts. There are, however, opinions of the Attorney General of California construing section 1892 of the Code of Civil Procedure, section 1227 of the Government Code, and what is now section 1808 of the Vehicle Code, which makes certain motor vehicle records open to inspection “during office hours.” These opinions, which are to be accorded substantial weight (6 Cal.Jur.2d, Attorney General, § 11, p. 97), are similar to the above digested cases in implying inherent reasonableness limitations in the statutes (39 Ops.Cal.Atty.Gen. 298, 300; 34 Ops.Cal.Atty.Gen. 286, 287; 26 Ops.Cal.Atty.Gen. 136,140).
We therefore hold that the rights created by section 1892 of the Code of Civil Procedure and section 1227 of the Government Code, -are, by their very nature, not absolute, but are subject to an implied rule of reason. Furthermore, this inherent reasonableness limitation should enable the custodian of public records to formulate regulations necessary to protect the safety of the records against theft, mutilation or accidental damage, to prevent inspection from interfering with the orderly function of his office -and its employees, and generally to avoid chaos in the record archives.
Appellant contends that since the record here does not support a finding that his inspection practices have interfered directly with the tax collector’s office, no limitations on his right to inspect are permitted. But the statute should not be interpreted to prevent a custodian of records from formulating regulations for public inspection until the time that interference arises. Rules which will prevent interference in the future and still, in the meanwhile, not unnecessarily hamper public inspection of records are permissible.
*677' The tax collector, on the other hand, relies on various authorities which suggest that the custodian of public records has a discretion to exercise in regulating inspection and that the decision as to when inspection interferes with office operations is for him alone to make. (E.g., 34 Ops.Cal.Atty.Gen. 286, 287, supra.)
The Legislature has said, “It is the policy of the State of California that public records and documents be open for public inspection in order to prevent secrecy in governmental affairs. ...” (Assembly Joint Resolution No. 9, Stats. 1959, eh. Ill, p. 5588.) The public inspection statutes in most states specifically reserve to the custodian the power to make rules and regulations respecting inspection. (See, e.g., statutes construed in Chambers v. Kent (Sup.Ct.) 201 N.Y.S.2d 439; Butcher v. Civil Service Com., 163 Pa.Super. 343 [61 A.2d 367]; State ex rel. Youmans v. Owens, 28 Wis.2d 672 [137 N.W.2d 470, mod. 139 N.W.2d 241].) Nevertheless, the California Legislature did not include such language in our inspection statutes. We should not imply powers in the custodian of records to limit inspection that are any broader than is strictly essential to prevent inefficiency or chaos in public offices. In New York, where inspection statutes specifically give custodians powers to regulate inspection, limitations on inspection are narrowly construed. (C. Van Deusen, Inc. v. New York State Liquor Authority (Sup.Ct.) 47 Misc.2d 1094 [263 N.Y.S.2d 984, 986], quoting from New York Post Corp. v. Leibowitz, 2 N.Y.2d 677 [163 N.Y.S.2d 409, 143 N.E.2d 256, 260].)6 At common law, where public records were subject to inspection, the custodian's regulatory power was exercisable only to “prevent undue interference.” (Italics added.) (Disabled Police Veterans Club v. Long (Mo. App.) 279 S.W.2d 220, 223. Accord, Republican Party of Arkansas v. State (Ark.) 400 S.W.2d 660, 662; Courier-Journal & Louisville Times Co. v. Curtis (Ky.) 335 S.W.2d 934, 937.)
Accordingly denial of the right of inspection is proper only when necessary to prevent interference to respondent’s office —limitations on inspection cannot be permitted merely because certain rules and regulations are “reasonable” in the abstract. (See State v. Harrison, supra, (W.Va.) 43 S.E.2d 214, 219.)
*678The remaining question is whether the tax collector’s amended rules, when properly construed, can be said to be reasonably necessary to assure the orderly operation of his office.
All intendments favor the validity of a decree or judgment. Courts should interpret judgments in such manner as to make them valid and with reference to the law regulating the rights of the parties. (Estate of Gould, 181 Cal. 11, 14 [183 P. 146]; Watson v. Lawson, 166 Cal. 235, 241 [135 P. 961]; In re Gideon, 157 Cal.App.2d 133, 135 [320 P.2d 599].) Since for practical purposes, the amended regulations make up the “judgment” here, we should apply the foregoing rules in construing those regulations.
By interpreting the tax collector’s rules in light of the above construction of the California inspection statutes, the judgment here should be affirmed. The phrase “as deemed necessary” in those rules cannot be taken to give the tax collector greater regulatory powers than the statutes permit. The power to restrict inspection is no greater during the weeks of peak workload in his office (although occasions for exercising it may arise more frequently during those periods). We must assume that the tax collector will carry out his official duty, and that duty enables him to ‘‘ deem it necessary” to restrict inspection only when strictly necessary to prevent direct interference with the operations of his office. He may not restrict inspection because appellant’s letters to landowners upset them and result in bothersome telephone calls to his office. (See Harrison v. Powers, 19 Cal.App. 762, 763 [127 P. 818]; Aitcheson v. Huebner, 90 Mich. 643 [51 N.W. 634].) He may not restrict inspection now because he fears that at some future date proliferation of extended searches by the public may burden his office.
Inspection may be denied or restricted if (1) records are needed by the staff of the tax collector’s office or other officials; (2) the adequate space for inspection which the tax collector, in his regulations, has undertaken to provide is, at a particular moment, occupied by other members of the public; (3) he has valid reasons to fear defacement or other damage to the records, and supervision of inspection is, at the moment, impossible; (4) a person is monopolizing certain records to the detriment of other members of the public who wish to inspect them.
It is urged that the record does not disclose a need for respondent to deny inspection from 8 a.m. to 8:30 a.m. and *6794:30 p.m. to 5 p.m. This is true. However, the denial of inspection at these two half-hour periods is not so substantial a denial of appellant’s rights that we can hold the trial court abused its discretion in denying the writ of mandate. (See Dowell v. Superior Court, supra, 47 Cal.2d 483,486-487.)
The amended rules regulating public inspection are to be construed in favor of the broadest exercise by the public of the right of inspection. Based on that premise the judgment is affirmed.
Traynor, C. J., McComb, J., Tobriner, J., Burke, J., and Sullivan, J., concurred.
The type of examination of records referred to was the “extended search, ’ ’ which involves going over a record book page by page. It is conceded that the tax collector has at all times provided to members of *669the public information about one or two specific parcels, with the actual inspection normally made by staff members.
Offiee hours are 8 a.m. to 5 p.m.
Actually, the time at which assessed valuation ought, to have been taken for evidentiary purposes was that date at which the protests against annexation were presented to the city council, and not, as the opinion states, the date when the petition for the writ was filed in court.
The rule is tempered, of course, by the requirement that a party cannot be permitted to introduce evidence at the hearing not contemplated by the issues set forth in the pleadings and which might surprise the opposing litigant and leave Mm unprepared to submit rebuttal evidence. (Cf. Rittersbacher v. Board of Supervisors, supra, 220 Cal. 535, 540.)
The language for which appellant seeks a literal interpretation are the words "at all times during office hours” in section 1227 of the Government Code.
Compare State v. Owens, supra (Wis.) 137 N.W.2d 470, 475: “ [P]ublic policy favors the right of inspection of public records and documents, and, it is only in the exceptional case that inspection should be denied. ’ ’