
52 Cal.App.4th 1100 (1997)
CALIFORNIA BUSINESS COUNCIL FOR EQUAL OPPORTUNITY et al., Petitioners,
v.
THE SUPERIOR COURT OF SACRAMENTO COUNTY, Respondent; PETE WILSON, as Governor, etc., Real Party in Interest.
Docket No. C024875.
Court of Appeals of California, Third District.
February 19, 1997.
*1101 COUNSEL
Munger, Tolles & Olson, Bradley S. Phillips, Jeffrey L. Bleich and Steven B. Weisburd for Petitioners.
*1102 No appearance for Respondent.
Anthony T. Caso and Sharon L. Browne for Real Party in Interest.
[Opinion certified for partial publication.[*]]
OPINION
BLEASE, Acting P.J.
In the published part of the opinion in this writ proceeding[1] we determine that the time within which to file a peremptory challenge to the "all-purpose" assignment of a trial court judge (Code Civ. Proc., § 170.6, subd. (2))[2] is extended when "notice" of the assignment is served by mail (§ 1013, subd. (a)).

Facts
In the underlying dispute the real party in interest, Governor of the State of California (real party), brought a proceeding in mandate against various state officials to compel them to discontinue enforcement of various provisions of the Education, Government, and Public Contract Codes relating to affirmative action. The real party named the petitioners, California Business Council for Equal Opportunity et al. (hereafter CBC), as real parties in interest in the underlying action, the merits of which are not pertinent to the issue before us.
The action was assigned to Judge James T. Ford, who was challenged pursuant to section 170.6. A new order was issued by the presiding judge of the superior court on August 29, 1996, assigning Judge Thomas Cecil to the case as a judge for all purposes. On the same day the clerk of the superior court deposited copies of both the minute order memorializing the assignment and the formal order signed by the presiding judge in the mail, in sealed envelopes, postage paid, addressed to the persons to be served at an address in California. The manner of service was attested to by the declaration of a deputy clerk.
CBC's peremptory challenge to Judge Cecil was filed on September 12, 1996, 14 days after the copy of the order was mailed. The superior court ruled the challenge untimely on the ground the 10-day period within which to file a challenge under section 170.6, subdivision (2), was not extended by section 1013 and had expired.
This writ proceeding followed. Because we find the disqualification motion timely filed we will issue a peremptory writ directing the superior court *1103 to set aside its order of September 30, 1996, and to issue a new order granting the motion to disqualify Judge Cecil.

Discussion

I
(1) Section 1013, subdivision (a), which establishes the form and manner of service of papers by mail, provides in pertinent part: "In case of service by mail.... [t]he service is complete at the time of the deposit, but any period of notice and any right or duty to do any act or make any response within any period or on a date certain after the service of the document, which time period or date is prescribed by statute or rule of court, shall be extended five days upon service by mail if the place of address is within the State of California...." (Stats. 1995, ch. 576, § 3.8.)
This says inter alia that when a period, prescribed by statute or rule of court, within which to exercise a right or perform a duty is commenced by the service of notice by mail, the period is extended five days if the address is within California.
Section 170.6, subdivision (2), prescribes such a period. It provides that a peremptory challenge to the assignment of a judge for all purposes "shall be made ... within 10 days after notice of the all purpose assignment...."[3] (Italics added.) This says that the 10-day period "within" which to exercise the right to a peremptory challenge is commenced by "notice" of the assignment.
At issue is whether such "notice" includes notice by the means specified in section 1013, thereby extending the period within which to make the challenge when service of the notice is by mail. We conclude that it does.

A.
The real party first argues that "under Section 1013, it is the period of notice that is extended by five days, not the time in which to respond to a notice...." He relies on a 1980 amendment to section 1013 which added *1104 "period of notice" to the existing provision.[4] To the extent this makes sense in the context of section 170.6, the argument appears to be that section 1013 requires extended notice only with respect to the assignment of the judge, not with respect to the period within which a peremptory challenge may be made to the assignment, i.e., 15 days notice of the effective date of the assignment but only 10 days notice of the time within which to challenge the assignment. The real party misreads the statute.
The implication of the argument is that the 1980 addition, which provided for an additional "period of notice," also subtracted the provision for extension of the period within which to exercise a right or perform a duty. It did not.
Section 1013 had provided since the 1872 Code of Civil Procedure that: "In case of service by mail.... [t]he service is complete at the time of the deposit; but if within a given number of days after such service a right may be exercised, or an act is to be done by the adverse party, the time within which such right may be exercised, or act be done, is extended" a specified number of days. (Code Civ. Proc., § 1013 (1st ed. 1872) pp. 774-775; see DeMiglio v. Superior Court (1981) 115 Cal. App.3d 973, 976, fn. 6 [171 Cal. Rptr. 787].)[5]
The 1980 amendment did not delete the right/duty language. It provided for extended notice, upon service by mail, as to "any prescribed period of notice and any right or duty to do any act or make any response within any prescribed period...." (Italics added.) The right/duty language manifestly refers to the period within which a right may be exercised or a duty to act is to be performed. It is that period which is extended by service by mail. Here the period within which to exercise the right to file a peremptory challenge is 10 days after "notice" is given.

B.
This brings us to the real party's primary argument. He claims that section 1013 applies to a statute or rule of court only when it specifies "service" of *1105 notice as the event which commences (or triggers) the prescribed period within which to act and that the term "notice" in section 170.6 does not include "service" of notice. He relies on cases which involved or emphasized the requirement of service as the triggering event. (See Poster v. Southern Cal. Rapid Transit Dist. (1990) 52 Cal.3d 266 [276 Cal. Rptr. 321, 801 P.2d 1072]; Camper v. Workers' Comp. Appeals Bd. (1992) 3 Cal.4th 679 [12 Cal. Rptr.2d 101, 836 P.2d 888]; Citicorp North America, Inc. v. Superior Court (1989) 213 Cal. App.3d 563 [261 Cal. Rptr. 668]; People v. $20,000 U.S. Currency (1991) 235 Cal. App.3d 682 [286 Cal. Rptr. 746].) He also relies on Swenson v. Superior Court (1988) 202 Cal. App.3d 348 [248 Cal. Rptr. 340], which held that section 1013 did not apply to a local rule of court which commenced the prescribed period simply on "notice."
We disagree for the reason that "notice," as used in section 170.6, means notice by the means specified in the chapter of which section 1013 is a part, and that includes service of notice by mail.
Section 1013 specifies the event, service by mail, which invokes its provisions. It applies whenever (1) a statute or rule of court or common law rule[6] prescribes a period of notice or period within which to exercise a right or perform a duty and (2) the period is commenced by service by mail.
Section 170.6, subdivision (2) prescribes a 10-day period within which to make a peremptory challenge to the assignment of a judge for all purposes. The period is commenced by "notice" of the assignment.
As noted, the real party reads section 1013 as extending a prescribed period within which there is a right or duty to act only where a statute or rule expressly provides for the "service" of notice. He reads the term "notice" in section 170.6, subdivision (2), as not including service of notice. This reading equates "notice" with knowledge of the assignment rather than "service" of notice of the assignment. In In re Imperial Ins. Co. (1984) 157 Cal. App.3d 290 [203 Cal. Rptr. 664], the court discusses a statute that provides for a period of "knowledge" rather than a period of "notice." It concludes that under such language the period in which to act commences from the time that counsel is informed of the court's order, if "notice," i.e., service of notice, is waived.
The answer to the real party's argument is that the "notice" required by section 170.6 is the notice prescribed by the chapter of which section 1013 is a part, including notice given by service by mail.
Section 1013 is contained in a chapter entitled "Notices, and Filing and Service of Papers." (Tit. 14, ch. 5, commencing with § 1010.) The chapter *1106 governs "notice required by law ... to be given to a party to an action or to his attorney...." (§ 1020.) Notice may be given by personal service or by mail. (See §§ 1011, 1012.) If service is by mail, the papers must be deposited in a specified place for mail, in a sealed envelope, postage paid, addressed to the person to be served. (§ 1013, subd. (a).) A copy of the notice must bear a notation of the date and place of mailing or be accompanied by an unsigned copy of the affidavit or certificate of mailing. (§ 1013, subd. (b).) This is the manner of notice given in this case.
The chapter specifically addresses the service of court orders in section 1019.5. Notice of an order is given either by the prevailing party or the court. Section 1019.5, subdivision (b), provides that "[w]hen a motion is granted or denied on the court's own motion, notice of the court's order shall be given by the court in the manner provided in this chapter, unless notice is waived by all parties in open court and is entered in the minutes."
This encompasses every written order of the court not issued at the behest of a party. Section 1003 provides that "[e]very direction of a court or judge, made or entered in writing, and not included in a judgment, is denominated an order. An application for an order is a motion." Thus, the issuance of a written order on the court's own motion constitutes the granting of a motion.
For these reasons, notice of the written order assigning Judge Cecil as a judge for all purposes by the presiding judge was required to be served in the manner provided by the chapter of which section 1013 is a part. Since it was served by mail to an address in California, the notice came within the purview of section 1013, subdivision (a), extending thereby the period within which the petitioners had a right to challenge Judge Cecil by five days. Accordingly, the 10-day period provided by section 170.6, subdivision (2) within which to file a peremptory challenge to the assignment, was extended to the 15th day. Since the challenge was made on the 14th day following deposit of the notice in the mail it was timely.
Nothing in the case law impugns this analysis. It is true that Swenson v. Superior Court, supra, 202 Cal. App.3d 348, held that service by mail of "notice" of the appointment of "I/C [individual calendar or all-purpose] Judge" pursuant to Los Angeles Superior Court rule 1104.1 did not trigger the five-day extension provided by section 1013. However, an amendment to section 1013 made after Swenson has cut the ground from beneath the holding. Rule 1104.1 was designed to remedy a problem created by the interplay between it and the master calendar rule (§ 170.6). Rule 1104.1 required the challenge to be filed "within 10 days after notice of the assignment...." The Swenson court explained (p. 350) that Rule 1104.1 *1107 was a response to Augustyn v. Superior Court (1986) 186 Cal. App.3d 1221 [231 Cal. Rptr. 298]. It held that an all purpose assignment was subject to the provision of section 170.6, subdivision (2), that a peremptory challenge must be made "`... not later than the time the case is assigned for trial....'" (Augustyn, supra, 186 Cal. App.3d at pp. 1227-1229.) Augustyn interpreted this language as requiring that the objection must be made as soon as the designated judge is known to the parties, i.e., in court at the time the judge is named if the parties are present. (Ibid.) According to Swenson, the purpose of the amendment to rule 1104.1 was to relieve the parties of the need to challenge an all-purpose judge immediately upon assignment under the master calendar rule. (Swenson v. Superior Court, supra, 202 Cal. App.3d at pp. 350-351.) Since rule 1104.1 bestowed an extra 10 days in the event of mailed notice, it served the same purpose as the extension allowed by section 1013, in effect doubling the five day extension. Swenson thus ruled that rule 1104.1 was in effect an implied exception to 1013. (Swenson v. Superior Court, supra, 202 Cal. App.3d at pp. 350-351.)
Swenson is no longer applicable.[7] Section 1013 was amended subsequent to Swenson to say the "extension applies in the absence of a specific exception...." (§ 1013, subds. (a), (b) & (c); Stats. 1995, ch. 576, § 3.8.) As noted, the holding in Swenson was predicated upon an implied exception to section 1013, as was Beverly Union Co. v. Superior Court (1988) 206 Cal. App.3d 40 [253 Cal. Rptr. 359], which also concerned Los Angeles Superior Court rule 1104.1. Since section 170.6 contains no express exception to section 1013, the 10-day period of notice is extended by 5 days when notice is given by service by mail.

II[*]
.... .... .... .... .... .... .... .

Disposition
The motion to disqualify Judge Cecil was timely and, in the absence of any other basis for objection, should have been granted. We have previously notified the parties that we were considering the issuance of a peremptory writ of mandate in the first instance, and afforded them an opportunity to oppose our doing so. Having thus complied with the procedural requirements established in Palma v. U.S. Industrial Fasteners, Inc. (1984) 36 Cal.3d 171 *1108 [203 Cal. Rptr. 626, 681 P.2d 893], we need not issue an alternative writ or order to show cause.
Let a peremptory writ of mandate issue directing respondent superior court to vacate its order of September 30, 1996, denying as untimely the motion to disqualify Judge Cecil, and issue a new order granting that motion. The stay previously issued shall be dissolved upon the finality of this decision.
Sparks, J., and Morrison, J., concurred.
On March 13, 1997, the opinion was modified to read as printed above.
NOTES
[*]   See footnote 1, post, page 1102.
[1]  The Reporter of Decisions is directed to publish the opinion except for part II of the Discussion.
[2]  All undesignated references to a section are to the Code of Civil Procedure.
[3]  Section 170.6, subdivision (2), provides in pertinent part that "[i]f directed to the trial of a cause which has been assigned to a judge for all purposes, the motion [to disqualify the judge] shall be made to the assigned judge or to the presiding judge by a party within 10 days after notice of the all purpose assignment...." (Italics added.)
[4]  The pertinent language of section 1013 read: "The service is complete at the time of the deposit, but any prescribed period of notice and any right or duty to do any act or make any response within any prescribed period or on a date certain after the service of such document served by mail shall be extended five days if the place of address is within the State of California...." (Stats. 1980, ch. 196, § 2, p. 419.)

The 1980 version was amended in 1995 without substantial change to read as set forth above.
[5]  The 1872 codes are not to be found in the Statutes and Amendments to the Codes (the uncodified statutes). They are published only in the form of codes. A set of the 1872 codes is on file in the State Law Library in Sacramento.
[6]  (See People v. $20,000 U.S. Currency, supra, 235 Cal. App.3d 682.)
[7]  We imply no view on the persuasiveness of Swenson under the earlier statutory language. See International Union of Operating Engineers v. Superior Court (1989) 207 Cal. App.3d 340, 353, footnote 15 [254 Cal. Rptr. 782], a case arising prior to the 1995 "specific exception" amendment to section 1013.
[*]   See footnote, 1, ante, page 1100.
