Repository: vacanza/python-holidays

Issue:
Add Tonga holidays
Links:
  - https://en.wikipedia.org/wiki/Culture_of_Tonga#Public_holidays
  - https://www.timeanddate.com/holidays/tonga/


Discussion:

Resolving patch:
diff --git a/holidays/countries/__init__.py b/holidays/countries/__init__.py
--- a/holidays/countries/__init__.py
+++ b/holidays/countries/__init__.py
@@ -134,6 +134,7 @@
 from .tanzania import Tanzania, TZ, TZA
 from .thailand import Thailand, TH, THA
 from .timor_leste import TimorLeste, TL, TLS
+from .tonga import Tonga, TO, TON
 from .tunisia import Tunisia, TN, TUN
 from .turkey import Turkey, TR, TUR
 from .ukraine import Ukraine, UA, UKR
diff --git a/holidays/countries/tonga.py b/holidays/countries/tonga.py
new file mode 100644
--- /dev/null
+++ b/holidays/countries/tonga.py
@@ -0,0 +1,228 @@
+#  python-holidays
+#  ---------------
+#  A fast, efficient Python library for generating country, province and state
+#  specific sets of holidays on the fly. It aims to make determining whether a
+#  specific date is a holiday as fast and flexible as possible.
+#
+#  Authors: dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
+#           ryanss <ryanssdev@icloud.com> (c) 2014-2017
+#  Website: https://github.com/dr-prodigy/python-holidays
+#  License: MIT (see LICENSE file)
+
+from datetime import date
+from gettext import gettext as tr
+
+from holidays.calendars.gregorian import SEP, NOV, DEC
+from holidays.groups import ChristianHolidays, InternationalHolidays, StaticHolidays
+from holidays.observed_holiday_base import (
+    ObservedHolidayBase,
+    ALL_TO_NEAREST_MON_LATAM,
+    MON_TO_NEXT_TUE,
+    SUN_TO_NEXT_MON,
+)
+
+
+class Tonga(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays):
+    """
+    References:
+      - https://ago.gov.to/cms/images/LEGISLATION/PRINCIPAL/1919/1919-0008/PublicHolidaysAct_3.pdf  # 2020 Rev.  # noqa: E501
+      - https://ago.gov.to/cms/images/LEGISLATION/PRINCIPAL/1919/1919-0008/LaokihengaahiAhoMaloloFaka-Puleanga_3x.pdf  # 2020 Rev. (to)  # noqa: E501
+      - https://ago.gov.to/cms/images/LEGISLATION/PRINCIPAL/1919/1919-0008/PublicHolidaysAct_2.pdf  # 2016 Rev.  # noqa: E501
+      - https://ago.gov.to/cms/images/LEGISLATION/PRINCIPAL/1919/1919-0008/PublicHolidaysAct_1.pdf  # 1988 Rev.  # noqa: E501
+      - https://ago.gov.to/cms/images/LEGISLATION/PRINCIPAL/1919/1919-0008/LaokihengaahiAhoMaloloFaka-Puleanga_1x.pdf  # 1988 Rev. (to)  # noqa: E501
+      - http://www.paclii.org/to/legis/num_act/pha2010243/  # Act 10 of 2010.
+      - http://www.paclii.org/to/legis/num_act/pha2013243/  # Act 5 of 2013.
+
+    Checked With:
+      - https://www.gov.to/press-release/tonga-public-holidays-for-2024/  # 2024
+      - https://www.gov.to/press-release/tonga-public-holidays-for-2023/  # 2023
+      - https://www.gov.to/press-release/tonga-public-holidays-for-2022/  # 2022
+      - https://www.gov.to/press-release/tonga-public-holidays-for-2021/  # 2021
+      - https://www.gov.to/press-release/tonga-public-holidays-for-2020/  # 2020
+      - https://www.gov.to/press-release/tonga-public-holidays-for-2019-2/  # 2019
+      - https://www.gov.to/press-release/tonga-public-holidays-for-2018/  # 2018
+      - https://www.officeholidays.com/countries/tonga/2017  # 2017
+
+    1988 Revision Observance Rule:
+        Provided always that when any of the days specified falls upon a Sunday,
+        the next following Monday shall be a public holiday and that whenever
+        the twenty-sixth day of December falls upon a Monday the day following
+        shall be a public holiday. (Amended by Act 11 of 1970.)
+
+    2016 and 2020 Revision Observance Rule:
+        Provided that when any public holidays specified, except Christmas Day, the
+        day immediately succeeding Christmas Day, New Years Day, Good Friday,
+        Easter Monday, ANZAC Day, Birthday of the reigning Sovereign of Tonga
+        and Birthday of the Heir to the Crown of Tonga, falls upon a Thursday,
+        Friday, Saturday or Sunday, that public holiday shall be celebrated on the next
+        following Monday; and if it falls on a Tuesday or Wednesday, that public
+        holiday shall be celebrated on the Monday before the actual public holiday.
+        (Amended by Act 10 of 2010: May 18, 2010.)
+        "Birthday of the reigning Sovereign of Tonga and Birthday of the Heir to
+        the Crown of Tonga" is add to the exempted list as seen above.
+        (Amended by Act 5 of 2013: Jun 28, 2013.)
+
+        Further provided that the Birthday of the reigning Sovereign of Tonga and the
+        Birthday of the Heir to the Crown of Tonga shall be celebrated on the day it
+        falls, unless it falls on a Sunday in which case it would be celebrated on the
+        next following Monday.
+        (Inserted by Act 5 of 2013: Jun 28, 2013.)
+    """
+
+    country = "TO"
+    default_language = "to"
+    # %s (Observed).
+    observed_label = tr("%s (Fakatokanga'i)")
+    supported_languages = ("en_US", "to")
+
+    def __init__(self, *args, **kwargs):
+        ChristianHolidays.__init__(self)
+        InternationalHolidays.__init__(self)
+        StaticHolidays.__init__(self, cls=TongaStaticHolidays)
+        kwargs.setdefault("observed_rule", SUN_TO_NEXT_MON)
+        super().__init__(*args, **kwargs)
+
+    def _add_observed(self, dt: date, **kwargs):
+        if self._year >= 2010:
+            kwargs["rule"] = kwargs["rule"] or ALL_TO_NEAREST_MON_LATAM
+        return super()._add_observed(dt, **kwargs)
+
+    def _populate_public_holidays(self):
+        # Public Holidays Act, 1988 Revision.
+        if self._year <= 1988:
+            return None
+
+        # New Year's Day.
+        jan_1 = self._add_new_years_day(tr("'Uluaki 'Aho 'o e Ta'u Fo'ou"))
+        if self._year <= 2016:
+            self._add_observed(jan_1, rule=SUN_TO_NEXT_MON)
+
+        # Birthday of the King/Queen of Tonga.
+        # Topou VI: Jul 12 (2012-Present)*
+        # George Tupou V: May 4 (2007-2011)
+        # Tāufa'āhau Tupou IV: Jul 4: (1965-2006)
+        #  * By Cabinet Decision of Jul 6, 2012 this date was declared to be Jul 4,
+        #    thus not celebrated in 2012.
+
+        # Birthday of the Reigning Sovereign of Tonga.
+        name = tr("'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule")
+
+        if self._year == 2011:
+            self._move_holiday(self._add_holiday_may_4(name))
+        elif 2007 <= self._year <= 2010:
+            self._add_observed(self._add_holiday_may_4(name), rule=SUN_TO_NEXT_MON)
+        elif self._year != 2012:
+            self._add_observed(self._add_holiday_jul_4(name), rule=SUN_TO_NEXT_MON)
+
+        # Birthday of the Crown Prince/Princess of Tonga.
+        # Tupouto'a 'Ulukalala: Sep 17 (2012-Present)
+        # Topou VI: Jul 12 (2007-2011)
+        # George Tupou V: May 4 (1968-2006)
+
+        # Birthday of the Heir to the Crown of Tonga.
+        name = tr("'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga")
+
+        if self._year >= 2012:
+            self._add_observed(self._add_holiday_sep_17(name), rule=SUN_TO_NEXT_MON)
+        elif self._year >= 2010:
+            self._move_holiday(self._add_holiday_jul_12(name))
+        elif self._year >= 2007:
+            self._add_observed(self._add_holiday_jul_12(name))
+        else:
+            self._add_observed(self._add_holiday_may_4(name))
+
+        # Good Friday.
+        self._add_good_friday(tr("Falaite Lelei"))
+
+        # Easter Monday.
+        self._add_easter_monday(tr("Monite 'o e Toetu'u"))
+
+        # Anzac Day.
+        apr_25 = self._add_anzac_day(tr("'Aho Anzac"))
+        if self._year <= 2016:
+            self._add_observed(apr_25, rule=SUN_TO_NEXT_MON)
+
+        # Emancipation Day.
+        jun_4 = self._add_holiday_jun_4(tr("'Aho Tau'ataina"))
+        if self._year >= 2010:
+            self._move_holiday(jun_4)
+        else:
+            self._add_observed(jun_4)
+
+        # Coronation Date of Tongan Monarchy since 1970.*
+        # Topou VI: Jul 4 (2015-Present)**
+        # George Tupou V: Aug 1 (2008-2011)
+        # Tāufa'āhau Tupou IV: Jul 4: (1967-2006)**
+        #  *  No celebration for in-between years i.e. 2007, 2012-2014.
+        #  ** Has de facto merged with King's Birthday.
+
+        if 2008 <= self._year <= 2011:
+            name = tr(
+                # Anniversary of the Coronation Day of the reigning Sovereign of Tonga.
+                "Fakamanatu 'o e 'Aho Hilifaki Kalauni 'o 'Ene 'Afio ko e Tu'i 'o Tonga "
+                "'a ia 'oku lolotonga Pule"
+            )
+            if self._year >= 2010:
+                self._move_holiday(self._add_holiday_aug_1(name))
+            else:
+                self._add_observed(self._add_holiday_aug_1(name))
+
+        # Constitution Day.
+        nov_4 = self._add_holiday_nov_4(tr("'Aho Konisitutone"))
+        if self._year >= 2010:
+            self._move_holiday(nov_4)
+        else:
+            self._add_observed(nov_4)
+
+        dec_4 = self._add_holiday_dec_4(
+            # Anniversary of the Coronation of HM King George Tupou I.
+            tr("'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko Siaosi Tupou I")
+        )
+        if self._year >= 2010:
+            self._move_holiday(dec_4)
+        else:
+            self._add_observed(dec_4)
+
+        # Christmas Day.
+        self._add_christmas_day(tr("'Aho Kilisimasi"))
+
+        # Boxing Day.
+        dec_26 = self._add_christmas_day_two(tr("'Aho 2 'o e Kilisimasi"))
+        if self._year <= 2009:
+            self._add_observed(dec_26, rule=MON_TO_NEXT_TUE)
+
+
+class TO(Tonga):
+    pass
+
+
+class TON(Tonga):
+    pass
+
+
+class TongaStaticHolidays:
+    """
+    References:
+      - https://www.stuff.co.nz/sport/league/99338959/tonga-government-declares-public-holiday-over-rugby-league-teams-deeds  # noqa: E501
+      - https://www.rnz.co.nz/international/pacific-news/398653/tonga-declares-public-holiday-for-pm-pohiva-s-state-funeral  # noqa: E501
+      - https://www.nrl.com/news/2019/11/06/tonga-declare-public-holiday-for-woolfs-winning-warriors/  # noqa: E501
+    """
+
+    # Special Cases.
+
+    # Tonga Rugby Public Holiday.
+    rugby_special_holidays = tr("'Aho malolo 'akapulu 'a Tonga")
+
+    special_public_holidays = {
+        2017: (NOV, 29, rugby_special_holidays),
+        2019: (
+            # State Funeral of 'Akilisi Pohiva.
+            (SEP, 19, tr("Me'afaka'eiki 'o e Siteiti 'Akilisi Pohiva")),
+            (NOV, 15, rugby_special_holidays),
+        ),
+    }
+    # Special Case for 2021
+    special_holidays_observed = {
+        # Boxing Day.
+        2021: (DEC, 27, tr("'Aho 2 'o e Kilisimasi")),
+    }
diff --git a/holidays/registry.py b/holidays/registry.py
--- a/holidays/registry.py
+++ b/holidays/registry.py
@@ -140,6 +140,7 @@
     "tanzania": ("Tanzania", "TZ", "TZA"),
     "thailand": ("Thailand", "TH", "THA"),
     "timor_leste": ("TimorLeste", "TL", "TLS"),
+    "tonga": ("Tonga", "TO", "TON"),
     "tunisia": ("Tunisia", "TN", "TUN"),
     "turkey": ("Turkey", "TR", "TUR"),
     "ukraine": ("Ukraine", "UA", "UKR"),


Test patch:
diff --git a/tests/countries/test_tonga.py b/tests/countries/test_tonga.py
new file mode 100644
--- /dev/null
+++ b/tests/countries/test_tonga.py
@@ -0,0 +1,335 @@
+#  python-holidays
+#  ---------------
+#  A fast, efficient Python library for generating country, province and state
+#  specific sets of holidays on the fly. It aims to make determining whether a
+#  specific date is a holiday as fast and flexible as possible.
+#
+#  Authors: dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
+#           ryanss <ryanssdev@icloud.com> (c) 2014-2017
+#  Website: https://github.com/dr-prodigy/python-holidays
+#  License: MIT (see LICENSE file)
+
+from holidays.countries.tonga import Tonga, TO, TON
+from tests.common import TestCase
+
+
+class TestTonga(TestCase):
+    @classmethod
+    def setUpClass(cls):
+        super().setUpClass(Tonga, years=range(1989, 2050), years_non_observed=range(1989, 2050))
+
+    def test_country_aliases(self):
+        self.assertCountryAliases(Tonga, TO, TON)
+
+    def test_no_holidays(self):
+        self.assertNoHolidays(Tonga(years=1988))
+
+    def test_special_holidays(self):
+        self.assertHoliday(
+            "2017-11-29",
+            "2019-09-19",
+            "2019-11-15",
+        )
+        self.assertNoNonObservedHoliday(
+            # 2021 Boxing Day
+            "2021-12-27",
+        )
+
+    def test_government_actual_date_observance(self):
+        self.assertNonObservedHoliday(
+            # Emancipation Day.
+            "2017-06-04",
+            "2019-06-04",
+            "2020-06-04",
+            "2021-06-04",
+            "2022-06-04",
+            "2023-06-04",
+            "2024-06-04",
+            # Constitution Day.
+            "2017-11-04",
+            "2018-11-04",
+            "2020-11-04",
+            "2021-11-04",
+            "2022-11-04",
+            "2023-11-04",
+            # HM King Topou I's Coronation Day.
+            "2018-12-04",
+            "2019-12-04",
+            "2021-12-04",
+            "2022-12-04",
+            "2024-12-04",
+        )
+
+    def test_birthday_of_the_reigning_sovereign(self):
+        name = "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"
+        self.assertHolidayName(name, (f"{year}-07-04" for year in range(1989, 2007)))
+        self.assertHolidayName(name, (f"{year}-05-04" for year in range(2007, 2011)))
+        self.assertNoHolidayName(name, 2012)
+        self.assertHolidayName(name, (f"{year}-07-04" for year in range(2013, 2050)))
+
+        self.assertNoNonObservedHoliday(
+            # Topou IV.
+            "1993-07-05",
+            "1999-07-05",
+            "2004-07-05",
+            # Topou V.
+            "2008-05-05",
+            # Topou V (Act 10 of 2010).
+            "2011-05-02",
+            # Topou VI.
+            "2021-07-05",
+            "2027-07-05",
+        )
+        self.assertNonObservedHoliday(
+            # Topou V (Act 10 of 2010).
+            "2011-05-04",
+        )
+
+    def test_birthday_of_the_heir_to_the_crown(self):
+        name = "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"
+        self.assertHolidayName(name, (f"{year}-05-04" for year in range(1989, 2007)))
+        self.assertHolidayName(name, (f"{year}-07-12" for year in range(2007, 2011)))
+        self.assertHolidayName(name, (f"{year}-09-17" for year in range(2012, 2050)))
+
+        self.assertNoNonObservedHoliday(
+            # Topou IV's Heir: Topou V.
+            "1997-05-05",
+            "2003-05-05",
+            # Topou V's Heir: Topou VI.
+            "2009-07-13",
+            # Topou V's Heir: Topou VI (Act 10 of 2010).
+            "2011-07-11",
+            # Topou VI's Heir: Tupouto'a 'Ulukalala.
+            "2017-09-18",
+            "2023-09-18",
+            "2028-09-18",
+        )
+        self.assertNonObservedHoliday(
+            # Topou V's Heir: Topou VI (Act 10 of 2010).
+            "2011-07-12",
+        )
+
+    def test_coronation_day_anniversary(self):
+        name = (
+            "Fakamanatu 'o e 'Aho Hilifaki Kalauni 'o 'Ene 'Afio ko e Tu'i 'o Tonga "
+            "'a ia 'oku lolotonga Pule"
+        )
+        self.assertNoHolidayName(name, range(1989, 2008))
+        self.assertHolidayName(name, (f"{year}-08-01" for year in {2008, 2009, 2011}))
+        self.assertNoHolidayName(name, range(2012, 2050))
+
+        self.assertNoNonObservedHoliday(
+            # Topou V (Act 10 of 2010).
+            "2010-08-02",
+        )
+        self.assertNonObservedHoliday(
+            # Topou V (Act 10 of 2010).
+            "2010-08-01",
+        )
+
+    def test_2017(self):
+        # https://www.officeholidays.com/countries/tonga/2017
+        self.assertHolidays(
+            Tonga(years=2017),
+            ("2017-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2017-04-14", "Falaite Lelei"),
+            ("2017-04-17", "Monite 'o e Toetu'u"),
+            ("2017-04-25", "'Aho Anzac"),
+            ("2017-06-05", "'Aho Tau'ataina (Fakatokanga'i)"),
+            ("2017-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            ("2017-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2017-09-18", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga (Fakatokanga'i)"),
+            ("2017-11-06", "'Aho Konisitutone (Fakatokanga'i)"),
+            ("2017-11-29", "'Aho malolo 'akapulu 'a Tonga"),
+            (
+                "2017-12-04",
+                "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko Siaosi Tupou I",
+            ),
+            ("2017-12-25", "'Aho Kilisimasi"),
+            ("2017-12-26", "'Aho 2 'o e Kilisimasi"),
+        )
+
+    def test_2018(self):
+        # https://www.gov.to/press-release/tonga-public-holidays-for-2018/
+        self.assertHolidays(
+            Tonga(years=2018),
+            ("2018-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2018-03-30", "Falaite Lelei"),
+            ("2018-04-02", "Monite 'o e Toetu'u"),
+            ("2018-04-25", "'Aho Anzac"),
+            ("2018-06-04", "'Aho Tau'ataina"),
+            ("2018-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            ("2018-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2018-11-05", "'Aho Konisitutone (Fakatokanga'i)"),
+            (
+                "2018-12-03",
+                (
+                    "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko "
+                    "Siaosi Tupou I (Fakatokanga'i)"
+                ),
+            ),
+            ("2018-12-25", "'Aho Kilisimasi"),
+            ("2018-12-26", "'Aho 2 'o e Kilisimasi"),
+        )
+
+    def test_2019(self):
+        # https://www.gov.to/press-release/tonga-public-holidays-for-2019-2/
+        self.assertHolidays(
+            Tonga(years=2019),
+            ("2019-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2019-04-19", "Falaite Lelei"),
+            ("2019-04-22", "Monite 'o e Toetu'u"),
+            ("2019-04-25", "'Aho Anzac"),
+            ("2019-06-03", "'Aho Tau'ataina (Fakatokanga'i)"),
+            ("2019-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            ("2019-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2019-09-19", "Me'afaka'eiki 'o e Siteiti 'Akilisi Pohiva"),
+            ("2019-11-04", "'Aho Konisitutone"),
+            ("2019-11-15", "'Aho malolo 'akapulu 'a Tonga"),
+            (
+                "2019-12-02",
+                (
+                    "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko "
+                    "Siaosi Tupou I (Fakatokanga'i)"
+                ),
+            ),
+            ("2019-12-25", "'Aho Kilisimasi"),
+            ("2019-12-26", "'Aho 2 'o e Kilisimasi"),
+        )
+
+    def test_2020(self):
+        # https://www.gov.to/press-release/tonga-public-holidays-for-2020/
+        self.assertHolidays(
+            Tonga(years=2020),
+            ("2020-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2020-04-10", "Falaite Lelei"),
+            ("2020-04-13", "Monite 'o e Toetu'u"),
+            ("2020-04-25", "'Aho Anzac"),
+            ("2020-06-08", "'Aho Tau'ataina (Fakatokanga'i)"),
+            ("2020-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            ("2020-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2020-11-02", "'Aho Konisitutone (Fakatokanga'i)"),
+            (
+                "2020-12-07",
+                (
+                    "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko "
+                    "Siaosi Tupou I (Fakatokanga'i)"
+                ),
+            ),
+            ("2020-12-25", "'Aho Kilisimasi"),
+            ("2020-12-26", "'Aho 2 'o e Kilisimasi"),
+        )
+
+    def test_2021(self):
+        # https://www.gov.to/press-release/tonga-public-holidays-for-2021/
+        self.assertHolidays(
+            Tonga(years=2021),
+            ("2021-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2021-04-02", "Falaite Lelei"),
+            ("2021-04-05", "Monite 'o e Toetu'u"),
+            ("2021-04-25", "'Aho Anzac"),
+            ("2021-06-07", "'Aho Tau'ataina (Fakatokanga'i)"),
+            ("2021-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            (
+                "2021-07-05",
+                (
+                    "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku "
+                    "lolotonga Pule (Fakatokanga'i)"
+                ),
+            ),
+            ("2021-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2021-11-08", "'Aho Konisitutone (Fakatokanga'i)"),
+            (
+                "2021-12-06",
+                (
+                    "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko "
+                    "Siaosi Tupou I (Fakatokanga'i)"
+                ),
+            ),
+            ("2021-12-25", "'Aho Kilisimasi"),
+            ("2021-12-26", "'Aho 2 'o e Kilisimasi"),
+            ("2021-12-27", "'Aho 2 'o e Kilisimasi (Fakatokanga'i)"),  # ???
+        )
+
+    def test_2022(self):
+        # https://www.gov.to/press-release/tonga-public-holidays-for-2022/
+        self.assertHolidays(
+            Tonga(years=2022),
+            ("2022-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2022-04-15", "Falaite Lelei"),
+            ("2022-04-18", "Monite 'o e Toetu'u"),
+            ("2022-04-25", "'Aho Anzac"),
+            ("2022-06-06", "'Aho Tau'ataina (Fakatokanga'i)"),
+            ("2022-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            ("2022-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2022-11-07", "'Aho Konisitutone (Fakatokanga'i)"),
+            (
+                "2022-12-05",
+                (
+                    "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko "
+                    "Siaosi Tupou I (Fakatokanga'i)"
+                ),
+            ),
+            ("2022-12-25", "'Aho Kilisimasi"),
+            ("2022-12-26", "'Aho 2 'o e Kilisimasi"),
+        )
+
+    def test_2024(self):
+        # https://www.gov.to/press-release/tonga-public-holidays-for-2024/
+        self.assertHolidays(
+            Tonga(years=2024),
+            ("2024-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2024-03-29", "Falaite Lelei"),
+            ("2024-04-01", "Monite 'o e Toetu'u"),
+            ("2024-04-25", "'Aho Anzac"),
+            ("2024-06-03", "'Aho Tau'ataina (Fakatokanga'i)"),
+            ("2024-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            ("2024-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2024-11-04", "'Aho Konisitutone"),
+            (
+                "2024-12-02",
+                (
+                    "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko "
+                    "Siaosi Tupou I (Fakatokanga'i)"
+                ),
+            ),
+            ("2024-12-25", "'Aho Kilisimasi"),
+            ("2024-12-26", "'Aho 2 'o e Kilisimasi"),
+        )
+
+    def test_l10n_default(self):
+        # https://www.gov.to/press-release/tonga-public-holidays-for-2023/
+        self.assertLocalizedHolidays(
+            ("2023-01-01", "'Uluaki 'Aho 'o e Ta'u Fo'ou"),
+            ("2023-04-07", "Falaite Lelei"),
+            ("2023-04-10", "Monite 'o e Toetu'u"),
+            ("2023-04-25", "'Aho Anzac"),
+            ("2023-06-05", "'Aho Tau'ataina (Fakatokanga'i)"),
+            ("2023-07-04", "'Aho 'Alo'i 'o 'Ene 'Afio ko e Tu'i 'o Tonga 'oku lolotonga Pule"),
+            ("2023-09-17", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga"),
+            ("2023-09-18", "'Aho 'Alo'i 'o e 'Ea ki he Kalauni 'o Tonga (Fakatokanga'i)"),
+            ("2023-11-06", "'Aho Konisitutone (Fakatokanga'i)"),
+            (
+                "2023-12-04",
+                "'Aho Fakamanatu 'o e Hilifaki Kalauni 'o 'Ene 'Afio ko Siaosi Tupou I",
+            ),
+            ("2023-12-25", "'Aho Kilisimasi"),
+            ("2023-12-26", "'Aho 2 'o e Kilisimasi"),
+        )
+
+    def test_l10n_en_us(self):
+        self.assertLocalizedHolidays(
+            "en_US",
+            ("2023-01-01", "New Year's Day"),
+            ("2023-04-07", "Good Friday"),
+            ("2023-04-10", "Easter Monday"),
+            ("2023-04-25", "Anzac Day"),
+            ("2023-06-05", "Emancipation Day (Observed)"),
+            ("2023-07-04", "Birthday of the Reigning Sovereign of Tonga"),
+            ("2023-09-17", "Birthday of the Heir to the Crown of Tonga"),
+            ("2023-09-18", "Birthday of the Heir to the Crown of Tonga (Observed)"),
+            ("2023-11-06", "Constitution Day (Observed)"),
+            ("2023-12-04", "Anniversary of the Coronation of HM King George Tupou I"),
+            ("2023-12-25", "Christmas Day"),
+            ("2023-12-26", "Boxing Day"),
+        )