[¶ 1.] Doug Schaefers appeals the denial of his motion for summary judgment in a livestock trespass action. We affirm.
FACTS
[¶ 2.] Fred Zoss owns twenty-five acres of land in rural Sanborn County, South Dakota, that was planted as a pumpkin patch in the summer of 1996. On August 22, 1996, some of Schaefers’ cattle trespassed onto the property, damaging the pumpkin crop. Zoss discovered the trespass that August and the extent of the damage by mid-September. After attempting to negotiate with Schaefers’ insurer, Zoss brought suit against Schaefers with service of a summons and complaint on August 21, 1997. The suit was filed pursuant to SDCL 40-28-4 and SDCL 40-28-18 and their strict liability provisions for trespassing livestock.1
[¶ 3.] SDCL 40-28-20, the statute of limitations applicable to actions under SDCL 40-28-4 and SDCL 40-28-18, provides:
Any person seeking to recover damages pursuant to § 40-28-18 shall file suit no later than one year after the trespass occurred or six months after he knew or should have known of the injury resulting from the trespass.
Contending Zoss commenced his suit more than six months after he knew or should have known of the injury resulting from the trespass, Schaefers moved for summary judgment. In denying the motion, the circuit court found SDCL 40-28-20 ambiguous in setting forth two limitations periods (ie., one year or six months) without specifying when the different periods apply. Because of this ambiguity, the court applied the longer limitations period and denied summary judgment on the basis that Zoss commenced his action within one year after the trespass occurred. We granted Schaefers’ petition for an intermediate appeal of the order denying summary judgment.
ISSUE
[¶ 4.] Which alternative limitations period in SDCL 48-28-20 applies to Zoss’s trespass action?
[¶ 5.] In reviewing the grant or denial of summary judgment, this Court must determine whether a genuine issue of material fact exists and whether the law was correctly applied. Stene v. State Farm Mut. Auto. Ins. Co., 1998 SD 95, ¶ 10, 583 N.W.2d 399, 401. If there is any basis to *552support the court’s ruling, affirmance of its decision is proper. Id.
[¶ 6.] There are no factual disputes here. Resolution of this appeal is entirely dependent upon the correct interpretation of SDCL 40-28-20. “Statutory interpretation presents a question of law reviewable de novo.” Satellite Cable Srvs. v. Northern Electric, 1998 SD 67, ¶ 5, 581 N.W.2d 478, 480.
One of the primary rules of statutory ... construction is to give words and phrases their plain meaning and effect. This court assumes that statutes mean what they say and that legislators have said what they meant. When the language of a statute is clear, certain and unambiguous, there is no occasion for construction, and the court’s only function is to declare the meaning of the statute as clearly expressed in the statute.
South Dakota SIF v. CRE, 1999 SD 2, ¶ 17, 589 N.W.2d 206, 209 (quoting Delano v. Petteys, 520 N.W.2d 606, 608 (S.D.1994)). A statute is ambiguous when it is reasonably capable of being understood in more than one sense. Petition of Famous Brands, Inc., 347 N.W.2d 882, 886 (S.D.1984). When called upon to construe ambiguous statutes, courts may look to “the legislative history, title, and the total content of the legislation].]” LaBore v. Muth, 473 N.W.2d 485, 488 (S.D.1991).2
[¶ 7.] In LaBore, supra, this Court construed a statute prohibiting certain discriminatory practices based upon race, col- or, creed, religion, sex, ancestry, disability or national origin. The latter part of the statute prohibited additional discriminatory practices against “any person” and was separated from the former part of the statute by a semicolon and the word “or.” The issue in the case was whether the latter part was an independent clause extending protection to “any person,” or whether it was a dependent clause subject to the same class membership restrictions as the former part. Based on the legislative intent of the act as a whole and the express language of other applicable provisions, we held that the latter part of the statute was a dependent clause subject to class membership restrictions.
[¶ 8.] Relying on the dependent clause analysis in LaBore, Schaefers argues the six month limitations period in the latter half of SDCL 40-28-20 is a dependent clause subject to the general one year limitations period in the first half of the statute. Under this interpretation, SDCL 40-28-20 bars an action commenced within the one year limitations period if the plaintiff failed to commence the action within six months after learning of the damage resulting from the trespass. As Zoss failed to commence his action within six months after learning of his injuries, Schaefers contends the action is time barred and the circuit court erred in denying summary judgement.
[¶ 9.] The result in LaBore was premised on an interpretation of the statute made clear by resort to the, “legislative history, title, and ... total content of the legislation^]” LaBore, 473 N.W.2d at 488. Here, the legislative history of SDCL 40-28-20 fails to reveal a clear understanding of the statute. In fact, it yields an alternative interpretation just as valid as the one suggested by Schaefers. The earliest versions of SDCL 40-28-20 provided a *553limitations period for actions involving trespassing livestock of sixty days after the occurrence. See CL 1887, § 5569; RCCivP 1903, § 817; RC 1919, § 2921. In 1919, the sixty day period was increased to six months. See 1919 SD SessL ch 350. In 1921, the six month period was reduced to three months, but increased to one year in cases of injury caused by “Stallions over the age of eighteen months, Bulls over the age of ten months, [or] Rams or Boars over the age of eight months[.]” 1921 SD SessL ch 405, § 1. The reason for increasing the limitations period in cases involving the trespass of male livestock was explained in Janish v. Murtha, 285 N.W.2d 708 (S.D.1979) where we observed that damage from the unwanted impregnation or infection of livestock may necessitate an additional period of time to ascertain. See Janish, 285 N.W.2d at 709.
[¶ 10.] Janish may explain the Legislature’s inclusion of the alternative six month limitations period in the 1991 amendment of SDCL 40-28-20 into its current form. Consistent with Janish, the Legislature might have included the six month period to give trespass victims additional time to ascertain all incidental damages caused by a trespass, such as the infection or disease of living livestock and their offspring. Thus, the six month period may not have been intended as a dependent clause subject to the one year limitations period in the first half of the statute as Schaefers advocates. Rather, it may have been intended as an exception to the one year period benefiting victims with no reason to know of certain incidental damages caused' by a trespass until after the one year period expired. Under this interpretation, the six month limitations period is inoperative in the first year after a trespass. It only serves as an exception to the one year limitations period allowing victims who discover additional incidental damages after the one year period an additional six months in which to bring suit.
[¶ 11.] As the history of SDCL 40-28-20 yields an alternative interpretation of the statute rendering the six month limitations period inapplicable in the first year after a trespass and because Zoss commenced his action within that year, his action would be timely under the alternative interpretation. Given the existence’ of legitimate alternative interpretations of SDCL 40-28-20, we find no error by the court in allowing Zoss the benefit of the longer limitations period. As settled law provides:
[ I]n South Dakota, when one of two statutes of limitations may be applicable, such application should always be tested by the nature of the allegations in the complaint, and if there is any doubt as to which statute applies, such doubt should be resolved in favor of the longer limitation period.
Richards v. Lenz, 539 N.W.2d 80, 85 (S.D.1995)(quoting Morgan v. Baldwin, 450 N.W.2d 783, 786 (S.D.1990)). Accord 3A Norman J. Singer, Sutherland Statutory Construction § 70.03 (5th ed. 1992)(where two constructions of limitations period are possible, courts prefer the one allowing the longer period). The longer applicable limitations period here gave Zoss one year after the trespass to bring his action. Zoss brought the action within that time. Therefore, it was timely and summary judgment for Schaefers was appropriately denied.
[¶ 12.] Affirmed.
[¶ 13.] SABERS, AMUNDSON and GILBERTSON, Justices, concur. [¶ 14.] MILLER, Chief Justice, dissents.. SDCL 40-28-4 provides:
Except as in this chapter otherwise provided, any person owning or having in his charge or possession any horses, mules, cattle, goats, sheep, or swine, which such animals shall trespass upon the land, either fenced or unfenced, owned by or in possession of any person, or being cropped by any person injured by such trespass, shall be liable to any such person injured for all damages sustained by reason of such trespassing. No person shall be liable under this chapter where the person injured has maintained an inadequate partition fence and notice thereof has been given pursuant to § 43-23-5 or if he is not required to build such fence because of frozen earth pursuant to § 43-23-7.
SDCL 40-28-18 provides:
Damages under § 40-28-4 may be recovered in a civil action, in any court having jurisdiction thereof in the county where such damage may have occurred, and the proceedings shall be the same as in other civil actions, except as modified in this chapter.
. While the dissent finds the language of SDCL 40-28-20 clear, certain and unambiguous, it fails to explain how Zoss's action can be considered untimely when the parties agree it was commenced within, "one year after the trespass occurred].]” The defect in the dissent’s reasoning is that it focuses on the latter clause of the statute to the exclusion of the former with no explanation for giving the latter clause primacy when it is only separated from the former by the disjunctive "or” with no further qualifications. "In its ordinary sense, the term 'or’ is a conjunction indicating an alternative between different things or actions.” State v. Silseth, 399 N.W.2d 868, 870 (N.D.1987). Here, the dissent focuses solely on the latter clause of SDCL 40-28-20 and ignores the former clause to Zoss's detriment. This we cannot do.