Petitioner Caroline M. Siderius petitions for a writ of mandamus directing Judge Donald Banks of the Mobile Circuit Court to enter an order dismissing Kenneth V. Fordham’s child-custody proceeding. We grant the petition and issue the writ.
I. Facts and Procedural History
Siderius and Fordham entered into a common-law marriage in 2006.1 From September 2006 to July 2009, they lived together as husband and wife in Mobile with their minor children, L.F. and M.F. Siderius worked as a prosecutor in Mobile. Fordham is a retired Coast Guard officer and is involved in several business enterprises. In June 2009, Siderius accepted an appointment with the Social Security Administration’s Office of Disability Adjudication and Review (“ODAR”) to serve as an administrative law judge in the Portland, Oregon, ODAR office. In July 2009, Sid-erius moved with L.F. and M.F. to Portland to begin her new job. Fordham thereafter joined the family in Portland.
The family lived in Portland until March 2010. L.F. and M.F. were enrolled in Oregon’s West Linn school district from September 2009 through March 2010. Fordham would travel periodically to Alabama to manage rental properties he owns in Mobile. In February 2010, Siderius sought a hardship transfer to the Spokane, Washington, ODAR office. The hardship transfer was approved, and in March 2010 the whole family relocated to Washington. On April 6, 2010, Fordham and Siderius enrolled L.F. and M.F. in the Spokane public schools, which they attended until June 2011, the start of that year’s summer vacation.
In May 2011, the parties retained a court-approved mediator to assist with the dissolution of their marriage and custody of the minor children. With the mediator’s assistance, the parties developed parenting plans and a visitation schedule for the summer of 2011. Fordham does not dispute that the parties agreed that M.F. would be in Alabama from June 17 to July 7 or 8, 2011, and would then return to Washington. Likewise, Fordham does not dispute that the parties agreed that L.F. would be in Alabama from July 21 to August 6, and would then return to Washington. M.F. and L.F. traveled to Alabama as planned, and remained there with Ford-ham.
The parties had planned for M.F. and L.F. to return to Spokane in July and August, respectively, and in any case before September 3, 2011, to start school on September 6. Siderius purchased a plane ticket for M.F. to return to Spokane on August 11, 2011. However, on September 6 and 7, Fordham transferred the school registration of both children, who had re*322mained in Alabama, from Spokane to schools in Mobile.
On August 11, 2011, Fordham filed a child-custody petition and complaint for divorce in the Mobile Circuit Court. Fordham also filed an emergency motion seeking immediate custody of the children. The next day, the Mobile Circuit Court signed an order granting Fordham’s emergency motion and awarding him custody of the children pendente lite. On August 15, 2011, Siderius filed a petition in Spokane seeking dissolution of the marriage and custody of the minor children. The same day, the Spokane trial court issued an ex parte restraining order ordering Fordham to return the minor children to Washington. The Spokane trial court also scheduled initial divorce, custody, and contempt hearings, and a telephone conference with the Mobile Circuit Court pursuant to the Uniform Child Custody Jurisdiction and Enforcement Act, § 30-3B-101 et seq., Ala.Code 1975 (“the UCCJEA”). Also on August 15, 2011, Siderius filed a limited appearance in Fordham’s Mobile proceeding to challenge personal and subject-matter jurisdiction.
On August 30, 2011, the Spokane and Mobile courts held a telephone conference as required by the UCCJEA, § 30-3B-110, Ala.Code 1975. The Mobile court also held an evidentiary hearing on that day on the question of which state had jurisdiction and held a follow-up hearing on October 4, 2011. During the August 30 hearing, Sid-erius moved to dismiss Fordham’s complaint because he had not provided an affidavit of custody as required by § 30-3B-209, Ala.Code 1975. Siderius argued that the proceeding fell under the UC-CJEA as an initial custody proceeding. Fordham asserted that he need not file anything under the UCCJEA and argued that Alabama already had jurisdiction over Siderius. The Mobile court denied or withheld ruling on Siderius’s motion.
On October 7, 2011, the Mobile court issued an order finding that it had jurisdiction over Siderius on the basis of her minimum contacts with Alabama. The court did not rule on the applicability of the UCCJEA to the proceeding. In December 2011, L.F. returned to Washington and has resided with Siderius since that date.
Siderius thereafter filed a petition for a writ of mandamus in the Alabama Court of Civil Appeals. Fordham argued that the trial court had not ruled on the UCCJEA issue and that, therefore, Siderius’s petition was premature. The Court of Civil Appeals denied Siderius’s petition without an opinion. Ex parte Siderius (No. 2110171, January 11, 2012), 129 So.3d 1052 (Ala.Civ.App.2012) (table).
On February 10, 2012, the Spokane court issued an order awarding custody of the children to Siderius and finding, among other things, that Washington had jurisdiction under the UCCJEA because the minor children had lived with their parents in Washington for 17 months before the commencement of the child-custody proceeding in Alabama. The Spokane court also found Fordham in contempt for failing to return the children to Washington as the court had ordered in its August 15, 2011, restraining order. On February 24, 2012, Siderius registered the Spokane court’s custody determination and a motion for enforcement with the Mobile court. In March 2012, the Mobile court held a hearing on Siderius’s motion. On July 12, 2012, the Mobile court issued a brief order denying Siderius’s motion to enforce the Spokane court’s custody determination.
Siderius again petitioned the Court of Civil of Appeals for a writ of mandamus, seeking review of the Mobile court’s July 2012 order. The Court of Civil Appeals *323denied Siderius’s petition on January 11, 2013. Ex parte Siderius, 118 So.3d 712 (AIa.Civ.App.2013). That court explained its reasons for denying the petition as follows:
“[T]he mother has submitted no evidence that she might have relied upon in the Mobile Circuit Court as potentially supporting her position.... Notably, the affidavit of, and the letter authored by, the parties’ minor daughter, which documents were submitted by the father to the Mobile Circuit Court in support of his August 11, 2011, filings, have not been submitted to this court, nor do we have any transcript or statement of evidence adduced in the Mobile Circuit Court on September 30, 2011, and October 4, 2011, that might have persuaded that court to conclude that it, and not the Washington court, had ‘home state’ jurisdiction notwithstanding the extended absences of the children and the father from Alabama.”
118 So.3d at 716. Siderius thereafter filed this petition with this Court, together with the transcript of the Aabama trial court’s September and October 2011 hearings and relevant supporting evidence.
II. Standard of Review
“[Tjhe question of subject-matter jurisdiction is reviewable by a petition for a writ of mandamus.” Ex parte Flint Constr. Co., 775 So.2d 805, 808 (Ala.2000) (citing Ex parte Johnson, 715 So.2d 783, 785 (Ala.1998)).
“ ‘ “A writ of mandamus is an extraordinary remedy that requires a showing of: (1) a clear legal right in the petitioner to the order sought; (2) an imperative duty on the respondent to perform, accompanied by a refusal to do so; (3) the lack of another adequate remedy; and (4) the properly invoked jurisdiction of the court.” ’ ”
Ex parte Punturo, 928 So.2d 1030, 1033 (Ala.2002) (quoting Ex parte Bruner, 749 So.2d 437, 439 (Ala.1999), quoting in turn Ex parte McNaughton, 728 So.2d 592, 594 (Ala.1998)). “Subject-matter jurisdiction cannot be waived, and the lack of subject-matter jurisdiction may be raised at any time by a party or by a court ex mero motu.” 928 So.2d at 1033 (citing Greco v. Thyssen Mining Constr., Inc., 500 So.2d 1143 (Ala.Civ.App.1986)). “A judgment issued by a trial court without jurisdiction is a nullity.” 928 So.2d at 1034 (citing Ex parte Hornsby, 663 So.2d 966 (Ala.1995)).
III. Discussion
For this Court to issue a writ of mandamus, Siderius must demonstrate that she has a clear legal right to an order dismissing Fordham’s custody proceeding in Alabama. The controlling issue is which state — Alabama or Washington — has jurisdiction to make an initial child-custody and visitation determination under § 30-3B-201, Ala.Code 1975.
A. Home-State Jurisdiction Under the UCCJEA
Alabama and Washington have both adopted the UCCJEA. See § 30-3B-101 et seq., Ala.Code 1975, and § 26.27.011 et seq., Wash. Rev.Code Ann. (2001).
The relevant parts of Washington’s and Alabama’s respective versions of the UC-CJEA are substantially the same. Section 30-3B-201 governs jurisdiction of Alabama courts to make an initial child-custody determination:
“(a) Except as otherwise provided in Section 30-3B-204, a court of this state has jurisdiction to make an initial child custody determination only if:
“(1) This state is the home state of the child on the date of the commencement of the proceeding, or was *324the home state of the child within six months before the commencement of the proceeding and the child is absent from this state but a parent or person acting as a parent continues to live in this state;
[[Image here]]
“(b) Subsection (a) is the exclusive jurisdictional basis for making a child custody determination by a court of this state.
“(c) Physical presence of a child is not necessary or sufficient to make a child custody determination.”
The UCCJEA defines the term “home state” as follows:
“The state in which a child lived with a parent or a person acting as a parent for at least six consecutive months immediately before the commencement of a child custody proceeding. In the case of a child less than six months of age, the term means the state in which the child lived from birth with any of the persons mentioned. A period of temporary absence of the child or any of the mentioned persons is part of the period.”
§ 30-3B-102(7), Ala.Code 1975. Alabama adopted the UCCJEA to achieve the following purposes:
“(1) Avoid jurisdictional competition and conflict with courts of other states in matters of child custody which have in the past resulted in the shifting of children from state to state with harmful effects on their well-being;
“(2) Promote cooperation with the courts of other States to the end that a custody decree is rendered in that State which can best decide the case in the interest of the child;
“(3) Discourage the use of the interstate system for continuing controversies over child custody;
“(4) Deter abductions of children;
“(5) Avoid relitigation of custody decisions of other states in this state;
“(6) Facilitate the enforcement of custody decrees of other states.”
Official Comment to § 30-3B-101, Ala. Code 1975.
B. Two Definitions of “Home State” in the UCCJEA
Section 30-3B-201 (a)(1) provides that a state has jurisdiction in a child-custody matter if the state “was the home state of the child within six months before” the commencement of the child-custody proceeding. Section 30-3B-102(7), Ala.Code 1975, defines “home state” as “[t]he state in which a child lived with a parent ... for at least six consecutive months immediately before” the proceeding commenced. (Emphasis added.) On their face, it appears that § 30-3B-201(a)(1) and the definition of “home state” in § 30-3B-102(7) are in conflict.
In this case the children had lived in Washington for 17 months, nearly a year beyond the required “six consecutive months,” before Fordham filed the child-custody proceeding in Alabama. The children’s stay in Washington, however, was interrupted in June 2011, as to M.F., and in July 2011, as to L.F., when the children went to Alabama temporarily for either vacation or visitation. On August 11, 2011, Fordham filed his petition for divorce and custody in Alabama. On August 15, 2011, Siderius filed her petition in Washington.
It is undisputed that the children did not live in Alabama for “six consecutive months immediately before” Fordham filed his custody proceeding in Alabama. Thus, Alabama cannot be the “home state” under § 30-3B-102(7). The children also did not live in Washington in the “six consecutive months immediately before” the mother filed for divorce and custody. Thus, Washington cannot be the “home state” *325under Section 30-333-102(7). However, under § 30-3B-201(a)(l), Washington was the home state of the children “within six months before” Fordham’s August 11 filing for divorce and custody in Mobile.
Because the description of “home state” in § 30-3B-201(a)(l) is broader than the definition in § 30-3B-102(7), we resolve the apparent conflict between the two sections, in keeping with the purposes of the UCCJEA, by applying the construction that finds the existence of a home state, rather than the one that finds that the children had no home state. We interpret the UCCJEA in order to “[a]void jurisdictional competition and conflict with courts of other states in matters of child custody which in the past resulted in the shifting of children from state to state with harmful effects on their well-being.” Official Comment to § 30-3B-101, Ala Code 1975. There are two ways to resolve the apparent lack of “home state” jurisdiction under § 30-3B-201(a)(l), which is the “exclusive jurisdictional basis for making a child custody determination.” § 30-3B-201(b), Ala.Code 1975.
1. Temporary Absences Are Included in Calculating the Six-Month Period
First, “[a] period of temporary absence of the child or any of the mentioned persons is part of the period” of six consecutive months immediately before the custody proceeding commences. § 30-3B-102(7), Ala.Code 1975.
“At the time the adoption proceeding was initiated, aside from the child’s ‘temporary absence’ from Georgia while he was in the adoptive parents’ custody, the child had lived with his mother in Georgia for six consecutive months immediately preceding the filing of the adoption petition, and the mother continued to live in Georgia during the child’s ‘temporary absence’; thus, Georgia was the child’s home state.”
R.L. v. J.E.R., 69 So.3d 898, 902 (Ala.Civ. App.2011). In addition, “[c]ourts have found that ‘temporary absences include court-ordered visitations, and vacations and business trips.’” In re Marriage of McDermott, 175 WashApp. 467, 487, 307 P.3d 717, 727 (2013) (emphasis added). “[W]here both parents intend a child’s absence from a state to be temporary, the duration of that absence must be counted toward the establishment of a home state pursuant to the UCCJEA....” 175 Wash. App. at 489-90, 307 P.3d at 728. “[T]em-porary absences do not interrupt the six-month pre-complaint residency period necessary to establish home state jurisdiction.” Ogawa v. Ogawa, 125 Nev. 660, 662, 221 P.3d 699, 700 (2009).
Fordham does not dispute that the parties planned for M.F. and L.F. to return to Spokane before September 3, 2011, so they could start school on September 6. Ford-ham does not dispute that Siderius had purchased a plane ticket for M.F. to return to Spokane on August 11, 2011. Moreover, Fordham does not dispute that the parties had entered into a visitation agreement pursuant to which M.F. and L.F. would return to Spokane after their time visiting Fordham in Alabama in the summer of 2011. However, M.F.’s and L.F.’s Spokane school records indicate that on September '6 and 7, M.F. and L.F. were transferred from public schools in Spokane, where they had been registered, to schools in Mobile.
Based on the facts before us, the children’s absence from Spokane appears to have been only temporary, i.e., for the purpose of vacation or visitation. This temporary absence from Spokane is thus part of the “six consecutive months immediately before” the custody proceeding commenced. When the children’s temporary absences are factored in, therefore, the Spokane court clearly has home-state *326jurisdiction to make an initial child-custody and visitation determination under the UCCJEA. Conversely, Alabama does not.
2. The Six-Month “Extended Home State Provision”
Second, Washington’s home-state jurisdiction continued for an extended period of up to six months after the children had been removed to Alabama by Ford-ham, because Siderius continued to reside in Washington, the home state. See Official Comment to § 30-3B-201, ¶ 1. In determining the legislative intent of the UC-CJEA, “we must examine the statute as a whole and, if possible, give effect to each section.” Ex parte Exxon Mobil Corp., 926 So.2d 303, 309 (Ala.2005) (citing Employees’ Retirement Sys. of Alabama v. Head, 369 So.2d 1227, 1228 (Ala.1979)).
“The fundamental rule of statutory construction is that this Court is to ascertain and effectuate the legislative intent as expressed in the statute. ... In this ascertainment, we must look to the entire Act instead of isolated phrases or clauses; ... and words are given their plain and usual meaning.”
Darks Dairy, Inc. v. Alabama Dairy Comm’n, 367 So.2d 1378, 1380-81 (Ala. 1979) (emphasis added).
One purpose of the UCCJEA is to “[pjromote cooperation with the courts of other States to the end that a custody decree is rendered in that State which can best decide the case in the interest of the child.” Official Comment to § 30-3B-101, ¶ 2. The UCCJEA “prioritizes home state jurisdiction” “over other jurisdictional bases,” such as personal jurisdiction obtained through sufficient minimum contacts. See Official Comment to § 30-3B-201, ¶ 1. The Official Comment to Section 30-3B-201 provides:
“The six-month extended home state provision of subsection (a)(1) has been modified slightly from the UCCJA [Uniform Child Custody Jurisdiction Act]. The UCCJA provided that home state jurisdiction continued for six months when the child had been removed by a person seeking the child’s custody or for other reasons and a parent or a person acting as a parent continues to reside in the home state. Under this Act, it is no longer necessary to determine why the child has been removed. The only inquiry relates to the status of the person left behind.”
(Emphasis added.) The comment to the model Uniform Child Custody Jurisdiction Act, the predecessor to the UCCJEA, explained the six-month extended home-state provision:
“Subparagraph (ii) of paragraph (1) extends the home state rule for an additional six-month period in order to permit suit in the home state after the child’s departure. The main objective is to protect a parent who has been left by his spouse taking the child along.”
Comment to Model Uniform Child Custody Jurisdiction Act § 3, provision that was codified as § 30-3-23, Ala.Code 1975 (now repealed)(emphasis added).
In order to give effect to the legislative purpose of the UCCJEA, § 30-3B-201(a)(1) must be construed to extend home-state jurisdiction under § 30-3B-102(7) for an additional six months. Thus, the “home state” is not limited to only the “six consecutive months immediately before” the custody proceeding commences. The applicable six-consecutive-month period may also be determined “within” an extended or additional six-month period before the commencement of the proceeding under the second prong' of § 30-3B-201(a)(1). See DeWitt v. Lechuga, 393 S.W.3d 113, 119 (Mo.Ct.App.2013) (“The six-month extended home state provision ... provides that ‘home state jurisdiction’ *327continues for six months after a child is removed from the state but a parent continues to reside in the home state.”), and KM. v. J.S., 20 A.3d 496, 503 (Pa.Super.Ct.2011) (“By giving effect to the extended home state provision ... the likelihood that a state would be able to exercise home state jurisdiction over a child is substantially increased.”).
This construction of the UCCJEA avoids the absurd result here of the minor children’s having no home state because they did not live in Washington, the home state, for the full six months “immediately before” the proceeding commenced. This construction prioritizes home-state jurisdiction “over other jurisdictional bases,” Official Comment to § 30-3B-201, and carries forward the clear intent of the UC-CJEA that expressly incorporated the “six-month extended home state provision” from the UCCJA.
Finally, our construction of this apparent conflict in the UCCJEA comports with the construction given the UCCJEA by other state courts. See Welch-Doden v. Roberts, 202 Ariz. 201, 208-09, 42 P.3d 1166, 1173-74 (Ct.App.2002) (holding that a child’s home state “is not limited to the time period of ‘six consecutive months immediately before the commencement of a child custody proceeding.’ ... Instead, the applicable time period to determine ‘home state’ in such circumstances is ‘within six months before the commencement of the [child custody] proceeding.’”); Stephens v. Fourth Judicial Dist. Court, 331 Mont. 40, 44, 128 P.3d 1026, 1029 (2006) (same); Rosen v. Celebrezze, 117 Ohio St.3d 241, 248, 883 N.E.2d 420, 429 (2008) (“West Virginia was the home state of the minor children “within six months before the commencement’ of David’s West Virginia divorce case, i.e., they had lived in West Virginia for six consecutive months ending within the six months before the West Virginia case commenced.”); Mey-eres v. Meyeres, 196 P.3d 604, 607 (Utah Ct. App.2008) (“Utah was not the child’s home state when the Kansas proceeding commenced, but ... Utah was the child’s home state within the six months prior to commencement,” which gave Utah home-state jurisdiction.); and In re K.R., 229 W.Va. 733, 742, 735 S.E.2d 882, 891 (2012) (stating that, to determine a child’s home state, “a court must analyze whether any state qualified as the child’s ‘home state’ at any time within the six months immediately preceding commencement of the action” (emphasis added)).
Thus, the Washington trial court in this case properly exercised jurisdiction under the UCCJEA because it was the “home state” of the children within six months before the commencement of the child-custody proceeding under the “six-month extended home state provision” of § 30-3B-201(a)(1). Because Washington is the home state under the “extended home state provision” of the UCCJEA, the Alabama trial court lacks home-state jurisdiction over Fordham’s custody proceeding.
C. The Elements for Issuance of a Writ of Mandamus
A writ of mandamus is an extraordinary remedy. In order to be entitled to the •writ, Siderius must show a clear legal right to an order dismissing Fordham’s child-custody proceeding in the Alabama trial court, an imperative duty on the part of the Alabama trial court to dismiss Ford-ham’s proceeding, accompanied by a refusal to do so; the lack of another adequate remedy; and properly invoked jurisdiction of the court. Punturo, 928 So.2d at 1033.
Alabama courts have an imperative duty to apply the UCCJEA’s “mandatory jurisdictional rules for the original child custody proceeding.” Official Comment to § 30-3B-201, Ala.Code 1975. Siderius has *328demonstrated that she has a clear legal right under the UCCJEA to an order dismissing Fordham’s Alabama child-custody proceeding. The trial court therefore erred in denying Siderius’s motion to dismiss based on the irrelevant fact that Sid-erius had sufficient minimum contacts with Alabama to subject her to personal jurisdiction here.
Siderius lacks an adequate legal remedy other than mandamus. The UCCJEA is designed to eliminate the problem of simultaneous child-custody proceedings in two states. The sole remedy the UC-CJEA offers for simultaneous proceedings in separate states is not an appeal, but a dismissal of one proceeding if another state is a more appropriate forum. “If the court of the state having jurisdiction substantially in accordance with this chapter does not determine that'the court of this state is a more appropriate forum, the court of this state shall dismiss the proceeding.” § 30-3B-206(b), Ala.Code 1975 (emphasis added). The purposes of the UCCJEA will be defeated if Siderius is required to litigate Fordham’s initial child-custody proceeding to a final judgment in Alabama when Washington is the “home state” of the children. Finally, Siderius properly invoked the jurisdiction of the court.
IV. Conclusion
Siderius’s petition for a writ of mandamus is granted and we direct the Mobile Circuit Court to dismiss Fordham’s child-custody proceeding.
PETITION GRANTED; WRIT ISSUED.
STUART, BOLIN, PARKER, MAIN, and WISE, JJ., concur. MURDOCK and SHAW, JJ., concur in the result. BRYAN, J., recuses himself.*. The parties were legally married in Massachusetts; that marriage was dissolved in 2002 by the Mobile Circuit Court.