
3 Cal.2d 19 (1935)
GEORGE H. FRANCIS, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY et al., Respondents.
L. A. No. 15005. 
Supreme Court of California. In Bank.  
March 29, 1935.
 Boyd C. Barrington, in pro. per., Frank L. Simons, A. L. Bartlett, Lewis B. Randall, Richard H. Cantillon, Leslie K. Floyd, Robert N. Baker and W. Torrence Stockman for Petitioners.
 Libby & Sherwin and Warren E. Libby for Respondents.
 CURTIS, J.
 These two proceedings were instituted in the District Court of Appeal for the purpose of reviewing the order and judgment of the Superior Court of the County of Los Angeles adjudging the three petitioners guilty of contempt of court, and that each of them pay a fine of $500, and in default of such payment that they be imprisoned in the county jail of said county. Each paid the fine under protest, before the institution of these proceedings, in order to escape the jail sentence. As the two proceedings grew out of the same set of circumstances, and the convictions of all petitioners were embraced in one order and judgment, the matters were consolidated and are before us on a single record.
 The proceedings in contempt were initiated by the filing of an affidavit by Edward S. Shattuck, a deputy city attorney of the City of Los Angeles. By this affidavit it was alleged that on July 10, 1930, the City of Los Angeles filed a complaint in which it sought to condemn certain real property for public street purposes. Simon Verghis was made a defendant in said proceeding and filed an answer to the complaint through his attorney, E. H. Delorey, one of the petitioners herein. Said action as to the defendant Verghis was tried by the court without a jury. Judge Emmet H. Wilson, before whom the action was tried, awarded said defendant the sum of one dollar as damages in said action. Notice of intention to move for a new trial, signed by Boyd C. Barrington, one of the petitioners herein, as attorney for said defendant Verghis, was regularly served and filed. Said motion was granted by the court on October 30, 1931, and the case was again set for trial before Judge Wilson and the same came on for hearing before Judge Wilson on November 27, 1931, petitioners E. H. Delorey and Boyd C. Barrington appearing for defendant Verghis, *22 and resulted in a judgment that said defendant Verghis take nothing. It was not until May 23, 1932, that the interlocutory decree was entered in which said defendant Verghis was awarded nothing. It is recited in said decree that the two petitioners, E. H. Delorey and Boyd C. Barrington, appeared as counsel for defendant Verghis at said trial. No further action of any kind or character was taken with reference to the interest of the defendant Verghis in said action until June 7, 1932, when George H. Francis, the remaining petitioner herein, as deputy city attorney and as attorney for the City of Los Angeles, and the said E. H. Delorey and Boyd C. Barrington as attorneys for the defendant Verghis appeared before Judge Lewis H. Smith, one of the judges of said Superior Court of Los Angeles, and presiding in Department 9 of said Superior Court, being an entirely different department from the department in which Judge Wilson presided, and moved the court for a new trial in said action as to the defendant Verghis, which motion was granted on the stipulation of the parties thereto, as represented by their respective attorneys. The action was then tried before Judge Smith and resulted in an award in favor of defendant Verghis in the sum of $2,500. On June 10, 1932, the interlocutory judgment was signed by Judge Smith, which recited that Messrs. Erwin P. Werner and George H. Francis appeared for the plaintiff, the City of Los Angeles, and said E. H. Delorey and Boyd C. Barrington, appeared for the defendant Verghis. No claim is made that City Attorney Werner personally appeared in said proceedings, his only appearance being through his deputy, the said George H. Francis. Said interlocutory judgment further recited the findings of fact and conclusions of law were waived, and it was decreed therein that said defendant recover from the City of Los Angeles the sum of $2,500 and costs of suit. Said judgment was regularly docketed on June 13, 1932, and on July 6, 1932, a satisfaction of said judgment signed by said E. H. Delorey, "Attorney for Creditor," dated July 5, 1932, was filed. It further appears from said affidavit of Edward S. Shattuck that said sum of $2,500 was paid by the City of Los Angeles to E. H. Delorey, assignee of Simon Verghis, and that the warrant of said city by which said payment was paid was made out in the name of E. H. *23 Delorey, assignee of Simon Verghis, and was indorsed as drawn. It further appears by said affidavit that on the 7th, 8th, 9th and 10th of June, 1932, Honorable Emmet H. Wilson was sitting in Department 4 of the above-entitled court (the Superior Court of the County of Los Angeles) and was at all times available for his usual duties. The facts as stated in said affidavit were recited more in detail than we have set them forth herein. We think, however, we have stated all the material facts alleged in said affidavit, and that our statement is sufficient for all our present purposes. The gist of the charge against the petitioners is that after a judgment was rendered against the defendant Verghis by Judge Wilson, and while he was sitting in his department and was available for his usual duties, which would include the hearing of said motion for a new trial, the petitioners deliberately went into another department of said Superior Court, presided over by Judge Smith, and presented a motion for a new trial in said action and had the same considered and determined by Judge Smith.
 [1] Upon the filing of said affidavit proper proceedings were had which resulted in petitioners being brought before the said Superior Court to answer the charge against them as set forth in said affidavit. The petitioners appeared personally and by counsel, and a full and complete hearing was had in said court upon the matters charged against petitioners. At the conclusion of said hearing the judge before whom the proceedings were pending found the charges contained in said affidavit to be true and imposed the order and judgment now under review. The evidence taken at the hearing of the contempt proceedings, which has been certified to this court, amply supports the finding of the trial court in said proceedings as to all three petitioners. As to petitioner E. H. Delorey, there can be no question as to the sufficiency of the evidence to show his actual participation in the making of said motion with full knowledge of all the attending circumstances. He was the leading counsel for the defendant Verghis and made all the preliminary arrangements for the hearing of said motion before Judge Smith and knew full well that the former trial resulting in the judgment which he was seeking to have set aside by Judge Smith had been held before Judge Wilson. The evidence against him is most conclusive. While not as convincing against his associate, *24 Mr. Barrington, the evidence does show that he was fully informed as to all the prior proceedings in said action in so far as they affected his client Verghis, and that he prepared the notice of intention to move for a new trial after the second judgment was rendered against his client by Judge Wilson, and was present and participated in the making of the motion for a new trial before Judge Smith. He claims that while he was an attorney of record for defendant Verghis and participated in certain proceedings therein before Judge Wilson, his employment ceased before the second trial before Judge Wilson, and that it was by a mere chance that he happened to be in Judge Smith's court at the time the motion for a new trial was made before Judge Smith. The record hardly bears out this claim, since even his own evidence taken at the hearing of the contempt charge would seem to refute his contention that he did not personally participate in the proceedings before Judge Smith. After testifying that he went with Mr. Delorey to Judge Smith's court, and that Mr. Francis either went with them or that they met him there, he was asked by the court whether Mr. Delorey was associated with him in that case (the Verghis case), to which inquiry he replied: "It was Mr. Delorey's case. I was really associated with him." Q. "That is, you were associated together?" A. "Yes, that was my case, the will case (referring to a case in which Mr. Delorey and Mr. Barrington were then engaged in the trial) and Mr. Delorey was associated with me in that case, but this Verghis case was his case, and I was associated with him in this Verghis matter." Further along in the record we find the following testimony given by Mr. Barrington: Q. "But you were both associated in the matter of setting the case before Judge Smith?" A. "No, I had nothing to do with that." Q. (By Mr. Simons) "When you went over there how did you come to go to Judge Smith's court with Mr. Delorey?" A. "We were in the court room together trying this case together before Judge Sproul, and he said he had a couple of matters to hear before Judge Smith, and I went along with him. It developed when we got there that he had the Cline case and this Verghis case."
 Q. "The Cline case you were not interested in?"
 A. "Not the slightest; did not know anything about it." *25
 Q. "But in the Verghis case you were?"
 A. "Yes."
 Q. "And at that time did you file a motion for a new trial?"
 A. "Before that Mr. Delorey told me he had a stipulation with the city attorney's office that a motion for a new trial was to be granted, and a judgment obtained thereunder, for approximately $2,500.00, and asked me to prepare the motion for a new trial, which I prepared. I had knowledge of the proceeding; he told me he had had these conferences with Pete Werner and Mr. Francis, and that a new trial was to be granted ..."
 Mr. Barrington further testified relative to the proceedings before Judge Smith as follows:
 Q. "As near as you can recollect, Mr. Barrington, who stated anything to the court?"
 A. "Why, Mr. Delorey had a conference with Judge Smith; I was present and Mr. Francis was present, I think that was in chambers, asking if he would not hear this stipulation for a new trial, and for a judgment, and I think, as I recollect, Judge Smith asked if it was a stipulation. He said yes. He said, 'Well, if it is a stipulation, I will hear it', and he came out, took his position on the bench, heard the Cline case first, which took about five or ten minutes, and then called this case, and the motion for a new trial was presented, and it was stated through Mr. Francis that it was stipulated that it should be granted, and it was granted. They proceeded to trial, and called one witness, Mr. Frisbie, who testified as to the damage that had been done to Mr. Verghis' property, and he rendered judgment for $2,500.00."
 Q. "When you were in Judge Smith's court, you knew that this Verghis matter, the motion for a new trial, was to be made there on a stipulation before the court that it would be granted, that it could be granted by the court, did you believe that you had a right to go before Judge Smith with such a motion, based upon such a stipulation?"
 A. "Why, yes."
 Judge Smith, in answer to a question as to who was present at the trial of said action, replied, "Mr. Delorey, Mr. Barrington and Mr. Francis." *26
 From the foregoing evidence, most of it from his own lips, we think Mr. Barrington's interest in and connection with the Verghis case continued through the trial thereof before Judge Smith, and that his appearance in the courtroom at the time of a motion for a new trial and subsequent trial of the Verghis case was not so much in the role of innocent bystander as it was in that of an active participant in said proceedings.
 Petitioner George H. Francis was a deputy in the office of the city attorney of Los Angeles, and during the pendency of said condemnation proceeding had charge of the condemnation department of said city. He appears of record as one of the attorneys for the city with Mr. Thurmond Clarke, also a deputy city attorney, at the first trial of the Verghis case before Judge Wilson, but the record does not show that he was present at the second trial before Judge Wilson. However, immediately after said trial he had a conversation about the Verghis case with Mr. Clarke, from whom he learned the result of said trial. He was fully advised of the status of the case, both from the conversation with Mr. Clarke and from a conference with Mr. Frisbie, the appraiser of the city in condemnation proceedings. He felt that Mr. Verghis was entitled to $2,500 damages for his property taken in the condemnation proceeding, and that Judge Wilson's decision awarding him nothing was not justified by the facts in the case. He felt that the city attorney's office was to a large extent responsible for the unfavorable result in Judge Wilson's court. As far as the record shows, he made no attempt to rectify this result in any proceeding before Judge Wilson, or in the latter's court, but upon a telephone message from Mr. Delorey in which the latter asked Mr. Francis to meet Mr. Delorey in Judge Smith's department, he went to Judge Smith's department where he met Mr. Delorey and Mr. Barrington. As the attorney for the city, with the attorneys for Mr. Verghis, he participated in the consideration of the motion for a new trial, and on behalf of the city stipulated that the same might be granted. Thereupon the trial was had and a judgment rendered in Mr. Verghis' favor for the sum of $2,500 damages. As far as Mr. Francis' testimony shows, and we have read it in its entirety, he made no inquiry as to whether Judge Wilson had been consulted regarding the motion for a new trial *27 being made before Judge Smith, or why the motion was made before Judge Smith instead of Judge Wilson. Neither does he seek to justify his participation in said motion before Judge Smith by any claim that he supposed that Mr. Delorey, or anyone else, had obtained the consent of Judge Wilson to the making of said motion before Judge Smith. In fact, his entire conduct shows that he was not relying upon any such consent by Judge Wilson to the hearing of the motion for a new trial before Judge Smith. This state of facts, in our opinion, justified the conclusion of the trial court that petitioner Francis deliberately participated in the making of the motion for a new trial before Judge Smith with full knowledge that the former trial had been had before Judge Wilson, and without making any effort whatever to have Judge Wilson pass upon said motion or to inform himself why said motion was not made before Judge Wilson.
 [2] Section 661 of the Code of Civil Procedure provides that "The motion for a new trial shall be heard and determined by the judge who presided at the trial. ..." There is a proviso or exception to this general requirement in case the judge who presided at the trial is absent from that county where the trial was had, or is otherwise unavailable for the purpose of hearing the motion. We are not concerned with these exceptions, as both the affidavit of Edward S. Shattuck and the evidence before us show that Judge Wilson, on the day when the motion for a new trial was made before Judge Smith, was sitting in his department and was available for his usual duties. It is contended by petitioners that this provision of section 661, Code of Civil Procedure, is merely directory and that it was so construed by this court in the case of Pappadatos v. Superior Court, 209 Cal. 334 [287 P. 342]. We do not so understand the decision in that case. The provision quoted above was not involved in that decision, but a subsequent provision of the section was construed which required that a motion for a new trial, when made before a judge other than the trial judge, "shall be submitted not later than ten days before the expiration of the time within which the court has power to pass on the same". Requirements relating to the time within which acts are to be done are frequently held to be directory only (City of Los Angeles v. Hannon, 79 Cal.App. 669 [251 P. 247]; 23 Cal.Jur. 615). *28
 However, in the provision of section 661 we have a positive requirement that a motion for a new trial shall be heard and determined by the judge who presided at the trial. Prior to this enactment there was no statute or other provision of law requiring a motion for a new trial to be made before the judge who tried the case (Campbell v. Genshlea, 180 Cal. 213, 216 [180 P. 336]). In Gallup v. Smith, 59 Conn. 354 [22 Atl. 334, 12 L.R.A. 353], in determining whether a particular statute there under review was mandatory or directory, the court stated the rule as follows: "It is, of course, difficult to lay down a general rule to determine in all cases when the provisions of a statute are merely directory and when mandatory or imperative, but of all the rules mentioned, the test most satisfactory and conclusive is whether the prescribed mode of action is of the essence of the thing to be accomplished, or, in other words, whether it relates to matters material or immaterial--to matters of convenience or of substance." This rule appears to have met general approval in this state, as well as elsewhere (59 Cor. Jur., p. 1074; 25 R. C. L., p. 767; 23 Cal.Jur. 613). Another rule equally well recognized in the construction of such a statute is that whether a statute is mandatory or directory depends upon the legislative intent as ascertained from the consideration of the whole act (23 Cal.Jur., p. 613). Applying these rules to the construction of the provision of section 661, Code of Civil Procedure, requiring that a motion for a new trial shall be made before the judge who presided at the trial, if the judge who presided at the trial is available, we think that the very essence of this enactment is that the motion for the new trial shall be heard and determined whenever practicable by the judge who had heard the evidence at the trial of the case, and who was therefore best prepared and qualified to pass upon the merits of the motion. As we have seen, prior to the adoption of this section of the code in its present form, such a motion could be made before any judge of the court in which the action was pending. Such a procedure no doubt often produced confusion or resulted in a failure of justice in many instances. For it needs no argument, we think, to prove that a judge who has heard the evidence, examined the witnesses, and made a study of the law applicable to the facts in a case is best qualified to rule upon the weight and *29 value of the testimony of such witnesses, as well as upon other questions presented by the motion and which were involved in the trial of the action and to which the trial judge in most instances has given his attention and studious consideration. To have the motion for a new trial heard by a judge familiar with the facts and law of the case, rather than by one totally unfamiliar with such facts and who has made no special study of the law applicable to those facts, was the very essence of section 661 of the Code of Civil Procedure. Its requirements were therefore mandatory, according to the well- established rule announced above. To leave it optional with litigants to observe or disregard its provisions would defeat the very purpose and object of its enactment. This section of the code was first enacted in 1929. The legislature provided that such motions "shall be heard and determined by the judge who presided at the trial". There is no mistake as to the meaning of this language. It is true that "shall", used in a statute, does not always import that its provisions are mandatory, although in most cases it does, but when taken in connection with the subject matter of section 661, and the purposes to be accomplished by its enactment, we think the clear intent of the legislature was to use it in its mandatory sense. For as we have already pointed out, to construe this provision of the section as directory merely would be to defeat the very purpose of its enactment. It was, therefore, the duty of petitioners in making said motion for a new trial, after judgment had been rendered by Judge Wilson, to present the same to Judge Wilson.
 [3] The finding of the trial judge was that petitioners, and each of them, intended to evade further proceedings in the condemnation action with respect to the interest of Simon Verghis before the Honorable Emmet H. Wilson, judge of said Superior Court, and to wilfully disregard and evade his order and judgment entered therein on May 23, 1932. His conclusion from this finding was that said petitioners were, and each of them was, guilty of contempt of court. We have already reviewed the evidence introduced before said trial judge and held that the same was sufficient to show that petitioners, and each of them, with full knowledge that Judge Wilson had made his order and judgment of May 23, 1932, in which the defendant Verghis was *30 awarded nothing in said action, deliberately went before Judge Smith and made a motion for a new trial in said condemnation action, in so far as it concerned the defendant Verghis' interest in property involved in said action, stipulated that said motion ought to be granted, and then retried said action before Judge Smith, with the result that a judgment was rendered by Judge Smith awarding said defendant Verghis the sum of $2,500. The conclusion from these facts is irresistible that the purpose and intent of petitioners in going before Judge Smith was to evade the order and judgment of Judge Wilson of date May 23, 1932. No other reasonable construction can be placed upon their acts taken before Judge Smith. In fact, petitioners, at the hearing of the contempt proceedings, made no denial that such was their intent and purpose in having the motion for a new trial heard by Judge Smith, except possibly the petitioner Barrington, who as stated above, claimed that he took no part in the proceedings before Judge Smith.
 The fact that all parties to the condemnation proceedings stipulated that the matter might be taken up by Judge Smith and that the motion for a new trial might be granted does not, in our opinion, relieve the petitioners from the contempt charge, in face of the explicit direction of section 661 of the Code of Civil Procedure, that the motion should be made before the judge who presided at the trial. If petitioners are right in their contention that the stipulation afforded them protection in this matter, then we might have a situation where, if parties are dissatisfied with the judgment rendered by a particular judge, they could leave his courtroom and go from one judge to another until they had found one of the fifty judges of the Superior Court of Los Angeles County who would agree with them as to a proper judgment to be rendered. We hardly believe that such practice comports with the orderly dispatch of business in a court of justice, or that in the end it would result in meting out justice to the parties concerned. Petitioners give no reason or excuse for not bringing the motion for a new trial before Judge Wilson. Had they any legal reason for asking for a new trial, undoubtedly Judge Wilson would have entertained their motion, and if his former judgment was erroneous or worked any injustice to Mr. Verghis or the city, would have been glad to correct the error by rendering *31 a proper judgment, but as we have stated before, no attempt was made to bring the matter before Judge Wilson. It seems to us that a clear case of contempt of court has been made out against petitioners. Their action in going before Judge Smith was a wilful violation of their duty as attorneys and officers of the court (subd. 3, sec. 1209, Code Civ. Proc.), and was furthermore an unlawful interference with the proceedings before Judge Wilson (subd. 9 of said sec. 1209, Code Civ. Proc.; Falloon v. Superior Court, 79 Cal.App. 149, 157 [248 P. 1057]).
 [4] The claim is further made that the affidavit of Edward S. Shattuck is insufficient to form the basis of contempt proceedings against petitioners, in that it does not state that Judge Wilson was not fully advised of the intention of petitioners to make said motion for a new trial before Judge Smith, or that the proceedings before Judge Smith were not all done with his consent and approval. The fact that Judge Wilson might have been advised of petitioners' intention to make said motion for a new trial would not be available to petitioners as a defense unless he consented to such proceedings. He might have received such advice and objected to another judge hearing said motion. If he had consented to the making of such a motion before Judge Smith, such consent, to be effective, would undoubtedly have been made a matter of record in the proceeding before him in said action. The affidavit of Mr. Shattuck shows that Judge Wilson was available at the time for his usual duties, which would have included the duty of hearing said motion for a new trial. The affidavit further shows that the records of the condemnation action disclose that no further action of any kind or character was taken with reference to the interest of defendant Verghis in said action, except those which were taken before Judge Smith. If it was necessary for the affidavit to show that Judge Wilson did not consent to the hearing of said motion before Judge Smith, the fact alleged that the records do not disclose that any further proceeding in said action was taken before Judge Wilson is a sufficient negation that Judge Wilson ever consented to the hearing of said motion by transferring said action to Judge Smith's department (Selowsky v. Superior Court, 180 Cal. 404 [181 P. 652]; Ex parte Ah Men, 77 Cal. 198 [19 P. 380, 11 Am.St.Rep. *32 263]; In re Jarvis, 57 Cal.App. 533 [207 P. 494]; Ex parte Creely, 8 Cal.App. 713 [97 P. 766]).
 The judgment is affirmed.
 Thompson, J., Preston, J., Seawell, J., and Waste, C.J., concurred.
