holidays 0.68__py3-none-any.whl → 0.70__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- holidays/__init__.py +1 -1
- holidays/calendars/__init__.py +2 -1
- holidays/calendars/balinese_saka.py +112 -0
- holidays/calendars/buddhist.py +1 -1
- holidays/calendars/chinese.py +1 -1
- holidays/calendars/custom.py +1 -1
- holidays/calendars/gregorian.py +1 -1
- holidays/calendars/hebrew.py +1 -1
- holidays/calendars/hindu.py +866 -2
- holidays/calendars/islamic.py +161 -1
- holidays/calendars/julian.py +1 -1
- holidays/calendars/julian_revised.py +1 -1
- holidays/calendars/persian.py +1 -1
- holidays/calendars/sinhala.py +1 -1
- holidays/calendars/thai.py +309 -257
- holidays/constants.py +3 -1
- holidays/countries/__init__.py +7 -1
- holidays/countries/afghanistan.py +17 -7
- holidays/countries/albania.py +16 -7
- holidays/countries/algeria.py +14 -10
- holidays/countries/american_samoa.py +12 -6
- holidays/countries/andorra.py +5 -4
- holidays/countries/angola.py +15 -14
- holidays/countries/antigua_and_barbuda.py +145 -0
- holidays/countries/argentina.py +787 -169
- holidays/countries/armenia.py +5 -6
- holidays/countries/aruba.py +11 -9
- holidays/countries/australia.py +21 -20
- holidays/countries/austria.py +3 -1
- holidays/countries/azerbaijan.py +30 -19
- holidays/countries/bahamas.py +13 -11
- holidays/countries/bahrain.py +14 -7
- holidays/countries/bangladesh.py +5 -4
- holidays/countries/barbados.py +11 -9
- holidays/countries/belarus.py +15 -15
- holidays/countries/belgium.py +8 -6
- holidays/countries/belize.py +7 -6
- holidays/countries/bolivia.py +12 -11
- holidays/countries/bosnia_and_herzegovina.py +21 -11
- holidays/countries/botswana.py +8 -6
- holidays/countries/brazil.py +8 -7
- holidays/countries/brunei.py +56 -62
- holidays/countries/bulgaria.py +9 -10
- holidays/countries/burkina_faso.py +14 -5
- holidays/countries/burundi.py +17 -12
- holidays/countries/cambodia.py +15 -24
- holidays/countries/cameroon.py +16 -7
- holidays/countries/canada.py +13 -12
- holidays/countries/chad.py +15 -6
- holidays/countries/chile.py +29 -28
- holidays/countries/china.py +39 -38
- holidays/countries/colombia.py +15 -20
- holidays/countries/congo.py +6 -7
- holidays/countries/costa_rica.py +11 -10
- holidays/countries/croatia.py +8 -5
- holidays/countries/cuba.py +30 -27
- holidays/countries/curacao.py +6 -4
- holidays/countries/cyprus.py +4 -5
- holidays/countries/czechia.py +7 -6
- holidays/countries/denmark.py +5 -6
- holidays/countries/djibouti.py +11 -3
- holidays/countries/dominica.py +18 -16
- holidays/countries/dominican_republic.py +6 -4
- holidays/countries/ecuador.py +5 -4
- holidays/countries/egypt.py +10 -11
- holidays/countries/el_salvador.py +6 -5
- holidays/countries/estonia.py +3 -1
- holidays/countries/eswatini.py +6 -4
- holidays/countries/ethiopia.py +26 -11
- holidays/countries/fiji.py +183 -0
- holidays/countries/finland.py +11 -10
- holidays/countries/france.py +6 -9
- holidays/countries/gabon.py +17 -8
- holidays/countries/georgia.py +7 -7
- holidays/countries/germany.py +11 -11
- holidays/countries/ghana.py +14 -6
- holidays/countries/greece.py +4 -5
- holidays/countries/greenland.py +5 -6
- holidays/countries/guam.py +12 -6
- holidays/countries/guatemala.py +7 -9
- holidays/countries/guernsey.py +37 -34
- holidays/countries/guinea.py +182 -0
- holidays/countries/haiti.py +6 -5
- holidays/countries/honduras.py +8 -4
- holidays/countries/hongkong.py +49 -60
- holidays/countries/hungary.py +26 -23
- holidays/countries/iceland.py +5 -4
- holidays/countries/india.py +494 -174
- holidays/countries/indonesia.py +68 -108
- holidays/countries/iran.py +18 -9
- holidays/countries/ireland.py +5 -4
- holidays/countries/isle_of_man.py +2 -2
- holidays/countries/israel.py +4 -5
- holidays/countries/italy.py +5 -4
- holidays/countries/ivory_coast.py +156 -0
- holidays/countries/jamaica.py +6 -4
- holidays/countries/japan.py +5 -5
- holidays/countries/jersey.py +29 -26
- holidays/countries/jordan.py +13 -6
- holidays/countries/kazakhstan.py +72 -51
- holidays/countries/kenya.py +28 -18
- holidays/countries/kuwait.py +14 -7
- holidays/countries/kyrgyzstan.py +11 -6
- holidays/countries/laos.py +21 -29
- holidays/countries/latvia.py +7 -5
- holidays/countries/lesotho.py +6 -5
- holidays/countries/liechtenstein.py +5 -5
- holidays/countries/lithuania.py +4 -5
- holidays/countries/luxembourg.py +5 -3
- holidays/countries/macau.py +480 -0
- holidays/countries/madagascar.py +5 -4
- holidays/countries/malawi.py +6 -4
- holidays/countries/malaysia.py +30 -18
- holidays/countries/maldives.py +14 -7
- holidays/countries/malta.py +10 -19
- holidays/countries/marshall_islands.py +6 -4
- holidays/countries/mauritania.py +13 -6
- holidays/countries/mexico.py +8 -7
- holidays/countries/moldova.py +6 -4
- holidays/countries/monaco.py +6 -4
- holidays/countries/montenegro.py +16 -7
- holidays/countries/morocco.py +13 -8
- holidays/countries/mozambique.py +3 -1
- holidays/countries/namibia.py +7 -5
- holidays/countries/netherlands.py +6 -6
- holidays/countries/new_zealand.py +3 -1
- holidays/countries/nicaragua.py +6 -5
- holidays/countries/nigeria.py +13 -5
- holidays/countries/north_macedonia.py +13 -5
- holidays/countries/northern_mariana_islands.py +12 -6
- holidays/countries/norway.py +15 -15
- holidays/countries/pakistan.py +48 -18
- holidays/countries/palau.py +13 -11
- holidays/countries/panama.py +9 -8
- holidays/countries/papua_new_guinea.py +25 -21
- holidays/countries/paraguay.py +10 -9
- holidays/countries/peru.py +4 -5
- holidays/countries/philippines.py +32 -18
- holidays/countries/poland.py +7 -6
- holidays/countries/portugal.py +13 -15
- holidays/countries/puerto_rico.py +12 -6
- holidays/countries/qatar.py +172 -0
- holidays/countries/romania.py +6 -4
- holidays/countries/russia.py +6 -4
- holidays/countries/saint_kitts_and_nevis.py +24 -22
- holidays/countries/saint_lucia.py +8 -7
- holidays/countries/samoa.py +7 -6
- holidays/countries/san_marino.py +4 -3
- holidays/countries/saudi_arabia.py +15 -15
- holidays/countries/serbia.py +3 -4
- holidays/countries/seychelles.py +22 -26
- holidays/countries/singapore.py +33 -38
- holidays/countries/slovakia.py +6 -5
- holidays/countries/slovenia.py +7 -6
- holidays/countries/south_africa.py +8 -6
- holidays/countries/south_korea.py +25 -32
- holidays/countries/spain.py +31 -24
- holidays/countries/sri_lanka.py +52 -42
- holidays/countries/sweden.py +20 -19
- holidays/countries/switzerland.py +6 -5
- holidays/countries/taiwan.py +230 -31
- holidays/countries/tanzania.py +34 -27
- holidays/countries/thailand.py +134 -142
- holidays/countries/timor_leste.py +38 -17
- holidays/countries/tonga.py +46 -42
- holidays/countries/tunisia.py +9 -3
- holidays/countries/turkey.py +17 -9
- holidays/countries/tuvalu.py +12 -11
- holidays/countries/ukraine.py +54 -54
- holidays/countries/united_arab_emirates.py +43 -30
- holidays/countries/united_kingdom.py +7 -6
- holidays/countries/united_states.py +130 -86
- holidays/countries/united_states_minor_outlying_islands.py +12 -6
- holidays/countries/united_states_virgin_islands.py +12 -6
- holidays/countries/uruguay.py +10 -9
- holidays/countries/uzbekistan.py +16 -7
- holidays/countries/vanuatu.py +7 -5
- holidays/countries/vatican_city.py +16 -15
- holidays/countries/venezuela.py +11 -14
- holidays/countries/vietnam.py +15 -11
- holidays/countries/zambia.py +8 -6
- holidays/countries/zimbabwe.py +6 -4
- holidays/deprecations/v1_incompatibility.py +1 -1
- holidays/financial/__init__.py +1 -1
- holidays/financial/brasil_bolsa_balcao.py +14 -13
- holidays/financial/european_central_bank.py +7 -6
- holidays/financial/ice_futures_europe.py +7 -6
- holidays/financial/ny_stock_exchange.py +13 -10
- holidays/groups/__init__.py +2 -1
- holidays/groups/balinese_saka.py +45 -0
- holidays/groups/buddhist.py +1 -1
- holidays/groups/chinese.py +69 -4
- holidays/groups/christian.py +1 -1
- holidays/groups/custom.py +1 -1
- holidays/groups/eastern.py +1 -1
- holidays/groups/hebrew.py +1 -1
- holidays/groups/hindu.py +256 -1
- holidays/groups/international.py +1 -1
- holidays/groups/islamic.py +17 -3
- holidays/groups/persian.py +1 -1
- holidays/groups/sinhala.py +1 -1
- holidays/groups/thai.py +1 -7
- holidays/helpers.py +1 -1
- holidays/holiday_base.py +410 -273
- holidays/ical.py +228 -0
- holidays/locale/ar_QA/LC_MESSAGES/QA.mo +0 -0
- holidays/locale/de/LC_MESSAGES/PL.mo +0 -0
- holidays/locale/en_CI/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_HK/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/en_IN/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_PK/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/en_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/GN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/QA.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/en_US/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/CI.mo +0 -0
- holidays/locale/fr/LC_MESSAGES/GN.mo +0 -0
- holidays/locale/hi/LC_MESSAGES/IN.mo +0 -0
- holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/pt_TL/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/tet/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TL.mo +0 -0
- holidays/locale/th/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
- holidays/locale/ur_PK/LC_MESSAGES/PK.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/zh_CN/LC_MESSAGES/TW.mo +0 -0
- holidays/locale/zh_HK/LC_MESSAGES/HK.mo +0 -0
- holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
- holidays/locale/zh_TW/LC_MESSAGES/TW.mo +0 -0
- holidays/mixins.py +2 -2
- holidays/observed_holiday_base.py +5 -2
- holidays/registry.py +7 -1
- holidays/utils.py +151 -151
- holidays/version.py +2 -2
- holidays-0.70.dist-info/METADATA +1404 -0
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/RECORD +253 -222
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/WHEEL +1 -1
- holidays-0.68.dist-info/AUTHORS → holidays-0.70.dist-info/licenses/AUTHORS.md +7 -2
- {holidays-0.68.dist-info → holidays-0.70.dist-info/licenses}/LICENSE +1 -1
- holidays-0.68.dist-info/METADATA +0 -1080
- {holidays-0.68.dist-info → holidays-0.70.dist-info}/top_level.txt +0 -0
holidays/calendars/thai.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
5
5
|
# specific date is a holiday as fast and flexible as possible.
|
|
6
6
|
#
|
|
7
|
-
# Authors: Vacanza Team and individual contributors (see AUTHORS file)
|
|
7
|
+
# Authors: Vacanza Team and individual contributors (see AUTHORS.md file)
|
|
8
8
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
9
9
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
10
10
|
# Website: https://github.com/vacanza/holidays
|
|
@@ -21,83 +21,93 @@ THAI_CALENDAR = "THAI_CALENDAR"
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
class _ThaiLunisolar:
|
|
24
|
-
"""
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
24
|
+
"""Thai Lunar Calendar Holidays.
|
|
25
|
+
|
|
26
|
+
Works from 1913 (B.E. 2456/2455) onwards until 2157 (B.E. 2700), as we only have
|
|
27
|
+
Thai year-type data for cross-checking through that period.
|
|
28
|
+
|
|
29
|
+
## The basics of the Thai Lunar Calendar:
|
|
30
|
+
|
|
31
|
+
3-year types for calendar intercalation:
|
|
32
|
+
* Pakatimat (Normal Year):
|
|
33
|
+
Consists of 12 months, totaling 354 days.
|
|
34
|
+
* Athikawan (Extra-Day Year):
|
|
35
|
+
Adds one extra day to the 7th month, totaling 355 days for synodic month correction.
|
|
36
|
+
* Athikamat (Extra-Month Year):
|
|
37
|
+
Adds one extra 8th month, totaling 384 days for sidereal year correction.
|
|
38
|
+
|
|
39
|
+
Months alternate between 30 (even months) and 29 (odd months) days.
|
|
40
|
+
|
|
41
|
+
The waxing phase (Full Moon) lasts 15 days, while the waning phase (New Moon) lasts
|
|
42
|
+
14 days for odd months (except Month 7 in Athikawan years), 15 days for even months.
|
|
43
|
+
|
|
44
|
+
The second "Month 8" for Athikamat years is called "Month 8.8"
|
|
45
|
+
(read as "the latter 8th month"), with all observed holidays
|
|
46
|
+
delayed from the usual calendar by 30 days.
|
|
47
|
+
|
|
48
|
+
Implemented Thai Lunar Calendar holiday methods:
|
|
49
|
+
* Magha Puja / Makha Bucha / Meak Bochea:
|
|
50
|
+
15th Waxing Day (Full Moon) of Month 3 (On Month 4 for Athikamat Years).
|
|
51
|
+
`KHMER_CALENDAR` always falls on Month 3.
|
|
52
|
+
|
|
53
|
+
* Vesak / Visakha Bucha / Visaka Bochea:
|
|
54
|
+
15th Waxing Day (Full Moon) of Month 6 (On Month 7 for Athikamat Years).
|
|
55
|
+
`KHMER_CALENDAR` always falls on Month 6.
|
|
56
|
+
|
|
57
|
+
* Cambodian Royal Ploughing Ceremony / Preah Neangkol:
|
|
58
|
+
4th Waning Day of Month 6 (On Month 7 for Athikamat Years).
|
|
59
|
+
Defaults to `KHMER_CALENDAR` (its sole user).
|
|
60
|
+
|
|
61
|
+
* Buddha's Cremation Day / Atthami Bucha:
|
|
62
|
+
8th Waning Day of Month 6 (On Month 7 for Athikamat Years).
|
|
63
|
+
`KHMER_CALENDAR` always falls on Month 6.
|
|
64
|
+
|
|
65
|
+
* Asalha Puja / Asarnha Bucha:
|
|
66
|
+
15th Waxing Day (Full Moon) of Month 8 (On Month 8.8 for Athikamat Years).
|
|
67
|
+
|
|
68
|
+
* Buddhist Lent Day / Wan Khao Phansa:
|
|
69
|
+
1st Waning Day of Month 8 (On Month 8.8 for Athikamat Years).
|
|
70
|
+
|
|
71
|
+
* Boun Haw Khao Padapdin / Boon Khao Padap Din:
|
|
72
|
+
14th Waning Day (New Moon) of Month 9.
|
|
73
|
+
|
|
74
|
+
* Boun Haw Khao Salark / Boon Khao Sak:
|
|
75
|
+
15th Waxing Day (Full Moon) of Month 10.
|
|
76
|
+
|
|
77
|
+
* Pchum Ben / Prachum Bandar:
|
|
78
|
+
15th Waning Day (New Moon) of Month 10.
|
|
79
|
+
|
|
80
|
+
* Ok Boun Suang Huea / Vientiane Boat Racing Festival:
|
|
81
|
+
1st Waning Day (New Moon) of Month 11.
|
|
82
|
+
|
|
83
|
+
* Loy Krathong / Boun That Louang / Bon Om Touk:
|
|
84
|
+
15th Waxing Day (Full Moon) of Month 12.
|
|
85
|
+
|
|
86
|
+
Other Thai Lunar Calendar holidays:
|
|
87
|
+
* Thai Royal Ploughing Ceremony / Raeknakhwan:
|
|
88
|
+
Court astrologers choose the auspicious dates based on the Thai Lunar Calendar,
|
|
89
|
+
but these dates do not follow a predictable pattern.
|
|
90
|
+
See the specific section in `thailand.py` for more details.
|
|
91
|
+
|
|
92
|
+
* End of Buddhist Lent Day / Ok Phansa:
|
|
93
|
+
15th Waxing Day (Full Moon) of Month 11
|
|
94
|
+
(Currently calculated based on Asalha Puja / Asarnha Bucha method).
|
|
95
|
+
|
|
96
|
+
Notes:
|
|
97
|
+
The following code is based on Ninenik Narkdee's PHP implementation,
|
|
98
|
+
and we're thankful for his work.
|
|
99
|
+
|
|
100
|
+
References:
|
|
101
|
+
* <https://www.ninenik.com/แนวทางฟังก์ชั่น_php_อย่างง่ายกับการหาวันข้างขึ้นข้างแรม-1021.html>
|
|
102
|
+
* <https://www.myhora.com/ปฏิทิน/ปฏิทิน-พ.ศ.2560.aspx>
|
|
103
|
+
|
|
104
|
+
Example:
|
|
105
|
+
|
|
106
|
+
>>> from holidays.calendars.thai import _ThaiLunisolar
|
|
107
|
+
>>> thls = _ThaiLunisolar()
|
|
108
|
+
>>> print(thls.visakha_bucha_date(2010))
|
|
109
|
+
2010-05-28
|
|
110
|
+
|
|
101
111
|
"""
|
|
102
112
|
|
|
103
113
|
# Athikawan (Extra-Day Year) list goes from 1914-2157 C.E.
|
|
@@ -263,18 +273,21 @@ class _ThaiLunisolar:
|
|
|
263
273
|
self.__calendar = calendar
|
|
264
274
|
|
|
265
275
|
@staticmethod
|
|
266
|
-
def __is_khmer_calendar(calendar):
|
|
267
|
-
"""
|
|
268
|
-
|
|
269
|
-
|
|
276
|
+
def __is_khmer_calendar(calendar) -> bool:
|
|
277
|
+
"""Check if the given calendar is the Khmer calendar.
|
|
278
|
+
|
|
279
|
+
Args:
|
|
280
|
+
calendar:
|
|
281
|
+
The calendar identifier to check.
|
|
282
|
+
|
|
283
|
+
Returns:
|
|
284
|
+
True if the calendar is `KHMER_CALENDAR`, False otherwise.
|
|
270
285
|
"""
|
|
271
286
|
return calendar == KHMER_CALENDAR
|
|
272
287
|
|
|
273
288
|
@staticmethod
|
|
274
|
-
def __verify_calendar(calendar):
|
|
275
|
-
"""
|
|
276
|
-
Verify calendar type.
|
|
277
|
-
"""
|
|
289
|
+
def __verify_calendar(calendar) -> None:
|
|
290
|
+
"""Verify calendar type."""
|
|
278
291
|
if calendar not in {KHMER_CALENDAR, THAI_CALENDAR}:
|
|
279
292
|
raise ValueError(
|
|
280
293
|
f"Unknown calendar name: {calendar}. Use `KHMER_CALENDAR` or `THAI_CALENDAR`."
|
|
@@ -282,16 +295,17 @@ class _ThaiLunisolar:
|
|
|
282
295
|
|
|
283
296
|
@lru_cache
|
|
284
297
|
def _get_start_date(self, year: int) -> Optional[date]:
|
|
285
|
-
"""
|
|
286
|
-
|
|
298
|
+
"""Calculate the start date of that particular Thai Lunar Calendar Year.
|
|
299
|
+
|
|
287
300
|
This usually falls in November or December of the previous Gregorian
|
|
288
301
|
year in question. Should the year be outside of working scope
|
|
289
302
|
(1914-2157: B.E 2457-2700), this will returns None instead.
|
|
290
303
|
|
|
291
|
-
:
|
|
292
|
-
|
|
304
|
+
Args:
|
|
305
|
+
year:
|
|
306
|
+
The Gregorian year.
|
|
293
307
|
|
|
294
|
-
:
|
|
308
|
+
Returns:
|
|
295
309
|
The start date of Thai Lunar Calendar for a Gregorian year.
|
|
296
310
|
"""
|
|
297
311
|
if year < _ThaiLunisolar.START_YEAR or year > _ThaiLunisolar.END_YEAR:
|
|
@@ -307,32 +321,35 @@ class _ThaiLunisolar:
|
|
|
307
321
|
return _timedelta(_ThaiLunisolar.START_DATE, delta_days)
|
|
308
322
|
|
|
309
323
|
def makha_bucha_date(self, year: int, calendar=None) -> Optional[date]:
|
|
310
|
-
"""
|
|
311
|
-
Calculate the estimated Gregorian date of Makha Bucha.
|
|
312
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
324
|
+
"""Calculate the estimated Gregorian date of Makha Bucha.
|
|
313
325
|
|
|
314
326
|
Also known as "Magha Puja", "Makha Buxha" and "Meak Bochea".
|
|
315
327
|
This coincides with the 15th Waxing Day of Month 3
|
|
316
328
|
in Thai Lunar Calendar, or Month 4 in Athikamat years.
|
|
317
329
|
|
|
318
|
-
KHMER_CALENDAR will always use Month 3 regardless of year type.
|
|
330
|
+
`KHMER_CALENDAR` will always use Month 3 regardless of year type.
|
|
319
331
|
|
|
320
|
-
To calculate, we use
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
332
|
+
To calculate, we use the following time delta:
|
|
333
|
+
|
|
334
|
+
* Athikamat:
|
|
335
|
+
15th Waxing Day of Month 4 or 29[1] + 30[2] + 29[3] + 15[4] -1 = 102
|
|
336
|
+
|
|
337
|
+
* Athikawan:
|
|
338
|
+
15th Waxing Day of Month 3 or 29[1] + 30[2] + 15[3] -1 = 73
|
|
327
339
|
|
|
328
|
-
|
|
329
|
-
|
|
340
|
+
* Pakatimat:
|
|
341
|
+
15th Waxing Day of Month 3 or 29[1] + 30[2] + 15[3] -1 = 73
|
|
330
342
|
|
|
331
|
-
:
|
|
332
|
-
|
|
343
|
+
Args:
|
|
344
|
+
year:
|
|
345
|
+
The Gregorian year.
|
|
333
346
|
|
|
334
|
-
|
|
347
|
+
calendar:
|
|
348
|
+
Calendar type, this defaults to THAI_CALENDAR.
|
|
349
|
+
|
|
350
|
+
Returns:
|
|
335
351
|
Estimated Gregorian date of Makha Bucha.
|
|
352
|
+
Returns None if the Gregorian year input is invalid.
|
|
336
353
|
"""
|
|
337
354
|
calendar = calendar or self.__calendar
|
|
338
355
|
self.__verify_calendar(calendar)
|
|
@@ -352,31 +369,34 @@ class _ThaiLunisolar:
|
|
|
352
369
|
)
|
|
353
370
|
|
|
354
371
|
def visakha_bucha_date(self, year: int, calendar=None) -> Optional[date]:
|
|
355
|
-
"""
|
|
356
|
-
Calculate the estimated Gregorian date of Visakha Bucha.
|
|
357
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
372
|
+
"""Calculate the estimated Gregorian date of Visakha Bucha.
|
|
358
373
|
|
|
359
374
|
Also known as "Vesak" and "Buddha Day". This coincides with
|
|
360
375
|
the 15th Waxing Day of Month 6 in Thai Lunar Calendar, or Month 7 in Athikamat years.
|
|
361
376
|
|
|
362
|
-
KHMER_CALENDAR will always use Month 6 regardless of year type.
|
|
377
|
+
`KHMER_CALENDAR` will always use Month 6 regardless of year type.
|
|
363
378
|
|
|
364
379
|
To calculate, we use use the following time delta:
|
|
365
|
-
- Athikamat: 15th Waxing Day of Month 7
|
|
366
|
-
or 177[1-6] + 15[7] -1 = 191
|
|
367
|
-
- Athikawan: 15th Waxing Day of Month 6
|
|
368
|
-
or 147[1-5] + 15[6] -1 = 161
|
|
369
|
-
- Pakatimat: 15th Waxing Day of Month 6
|
|
370
|
-
or 147[1-5] + 15[6] -1 = 161
|
|
371
380
|
|
|
372
|
-
|
|
373
|
-
|
|
381
|
+
* Athikamat:
|
|
382
|
+
15th Waxing Day of Month 7 or 177[1-6] + 15[7] -1 = 191
|
|
383
|
+
|
|
384
|
+
* Athikawan:
|
|
385
|
+
15th Waxing Day of Month 6 or 147[1-5] + 15[6] -1 = 161
|
|
374
386
|
|
|
375
|
-
|
|
376
|
-
|
|
387
|
+
* Pakatimat:
|
|
388
|
+
15th Waxing Day of Month 6 or 147[1-5] + 15[6] -1 = 161
|
|
377
389
|
|
|
378
|
-
:
|
|
390
|
+
Args:
|
|
391
|
+
year:
|
|
392
|
+
The Gregorian year.
|
|
393
|
+
|
|
394
|
+
calendar:
|
|
395
|
+
Calendar type, this defaults to THAI_CALENDAR.
|
|
396
|
+
|
|
397
|
+
Returns:
|
|
379
398
|
Estimated Gregorian date of Visakha Bucha.
|
|
399
|
+
Returns None if the Gregorian year input is invalid.
|
|
380
400
|
"""
|
|
381
401
|
calendar = calendar or self.__calendar
|
|
382
402
|
self.__verify_calendar(calendar)
|
|
@@ -396,26 +416,29 @@ class _ThaiLunisolar:
|
|
|
396
416
|
)
|
|
397
417
|
|
|
398
418
|
def preah_neangkoal_date(self, year: int) -> Optional[date]:
|
|
399
|
-
"""
|
|
400
|
-
Calculate the estimated Gregorian date of Preah Neangkoal.
|
|
401
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
419
|
+
"""Calculate the estimated Gregorian date of Preah Neangkoal.
|
|
402
420
|
|
|
403
421
|
Also known as "Cambodian Royal Ploughing Ceremony". This always
|
|
404
422
|
coincides with the 4th Waning Day of Month 6 in Khmer Lunar Calendar.
|
|
405
423
|
|
|
406
424
|
To calculate, we use use the following time delta:
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
425
|
+
|
|
426
|
+
* Athikamat:
|
|
427
|
+
4th Waning Day of Month 6 (Khmer Lunar Calendar) or 177[1-5] + 19[6] -1 = 165
|
|
428
|
+
|
|
429
|
+
* Athikawan:
|
|
430
|
+
4th Waning Day of Month 6 or 147[1-5] + 19[6] -1 = 165
|
|
431
|
+
|
|
432
|
+
* Pakatimat:
|
|
433
|
+
4th Waning Day of Month 6 or 147[1-5] + 19[6] -1 = 165
|
|
434
|
+
|
|
435
|
+
Or as in simpler terms: "Visakha Bucha" (Khmer Lunar Calendar) +4.
|
|
436
|
+
|
|
437
|
+
Args:
|
|
438
|
+
year:
|
|
439
|
+
The Gregorian year.
|
|
440
|
+
|
|
441
|
+
Returns:
|
|
419
442
|
Estimated Gregorian date of Preah Neangkoal.
|
|
420
443
|
"""
|
|
421
444
|
start_date = self._get_start_date(year)
|
|
@@ -425,32 +448,36 @@ class _ThaiLunisolar:
|
|
|
425
448
|
return _timedelta(start_date, +165)
|
|
426
449
|
|
|
427
450
|
def atthami_bucha_date(self, year: int, calendar=None) -> Optional[date]:
|
|
428
|
-
"""
|
|
429
|
-
Calculate the estimated Gregorian date of Atthami Bucha.
|
|
430
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
451
|
+
"""Calculate the estimated Gregorian date of Atthami Bucha.
|
|
431
452
|
|
|
432
453
|
Also known as "Buddha's Cremation Day". This coincides with
|
|
433
454
|
the 8th Waning Day of Month 6 in Thai Lunar Calendar, or Month 7 in Athikamat years.
|
|
434
455
|
|
|
435
|
-
KHMER_CALENDAR will always use Month 6 regardless of year type.
|
|
456
|
+
`KHMER_CALENDAR` will always use Month 6 regardless of year type.
|
|
436
457
|
|
|
437
458
|
To calculate, we use use the following time delta:
|
|
438
|
-
- Athikamat: 8th Waning Day of Month 7
|
|
439
|
-
or 177[1-6] + 23[7] -1 = 199
|
|
440
|
-
- Athikawan: 8th Waning Day of Month 6
|
|
441
|
-
or 147[1-5] + 23[6] -1 = 169
|
|
442
|
-
- Pakatimat: 8th Waning Day of Month 6
|
|
443
|
-
or 147[1-5] + 23[6] -1 = 169
|
|
444
|
-
- Or as in simpler terms: "Visakha Bucha" +8
|
|
445
459
|
|
|
446
|
-
|
|
447
|
-
|
|
460
|
+
* Athikamat:
|
|
461
|
+
8th Waning Day of Month 7 or 177[1-6] + 23[7] -1 = 199
|
|
462
|
+
|
|
463
|
+
* Athikawan:
|
|
464
|
+
8th Waning Day of Month 6 or 147[1-5] + 23[6] -1 = 169
|
|
465
|
+
|
|
466
|
+
* Pakatimat:
|
|
467
|
+
8th Waning Day of Month 6 or 147[1-5] + 23[6] -1 = 169
|
|
468
|
+
|
|
469
|
+
Or as in simpler terms: "Visakha Bucha" +8
|
|
470
|
+
|
|
471
|
+
Args:
|
|
472
|
+
year:
|
|
473
|
+
The Gregorian year.
|
|
448
474
|
|
|
449
|
-
|
|
450
|
-
|
|
475
|
+
calendar:
|
|
476
|
+
Calendar type, this defaults to THAI_CALENDAR.
|
|
451
477
|
|
|
452
|
-
:
|
|
478
|
+
Returns:
|
|
453
479
|
Estimated Gregorian date of Atthami Bucha.
|
|
480
|
+
Returns None if the Gregorian year input is invalid.
|
|
454
481
|
"""
|
|
455
482
|
calendar = calendar or self.__calendar
|
|
456
483
|
self.__verify_calendar(calendar)
|
|
@@ -470,9 +497,7 @@ class _ThaiLunisolar:
|
|
|
470
497
|
)
|
|
471
498
|
|
|
472
499
|
def asarnha_bucha_date(self, year: int) -> Optional[date]:
|
|
473
|
-
"""
|
|
474
|
-
Calculate the estimated Gregorian date of Asarnha Bucha.
|
|
475
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
500
|
+
"""Calculate the estimated Gregorian date of Asarnha Bucha.
|
|
476
501
|
|
|
477
502
|
Also known as "Asalha Puja". This coincides with
|
|
478
503
|
the 15th Waxing Day of Month 8 in Thai Lunar Calendar,
|
|
@@ -480,19 +505,24 @@ class _ThaiLunisolar:
|
|
|
480
505
|
|
|
481
506
|
Lao Start of Buddhist Lent start on this day (1-day earlier than Thai and Khmer ones).
|
|
482
507
|
|
|
483
|
-
To calculate, we use
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
or 177[1-6] + 30[7] + 15[8] -1 = 221
|
|
488
|
-
- Pakatimat: 15th Waxing Day of Month 8
|
|
489
|
-
or 177[1-6] + 29[7] + 15[8] -1 = 220
|
|
508
|
+
To calculate, we use the following time delta:
|
|
509
|
+
|
|
510
|
+
* Athikamat:
|
|
511
|
+
15th Waxing Day of Month 8/8 or 177[1-6] + 29[7] + 30[8] + 15[8.8] -1 = 250
|
|
490
512
|
|
|
491
|
-
|
|
492
|
-
|
|
513
|
+
* Athikawan:
|
|
514
|
+
15th Waxing Day of Month 8 or 177[1-6] + 30[7] + 15[8] -1 = 221
|
|
493
515
|
|
|
494
|
-
:
|
|
516
|
+
* Pakatimat:
|
|
517
|
+
15th Waxing Day of Month 8 or 177[1-6] + 29[7] + 15[8] -1 = 220
|
|
518
|
+
|
|
519
|
+
Args:
|
|
520
|
+
year:
|
|
521
|
+
The Gregorian year.
|
|
522
|
+
|
|
523
|
+
Returns:
|
|
495
524
|
Estimated Gregorian date of Asarnha Bucha.
|
|
525
|
+
Returns None if the Gregorian year input is invalid.
|
|
496
526
|
"""
|
|
497
527
|
start_date = self._get_start_date(year)
|
|
498
528
|
if not start_date:
|
|
@@ -507,28 +537,32 @@ class _ThaiLunisolar:
|
|
|
507
537
|
return _timedelta(start_date, delta_days)
|
|
508
538
|
|
|
509
539
|
def khao_phansa_date(self, year: int) -> Optional[date]:
|
|
510
|
-
"""
|
|
511
|
-
Calculate the estimated Gregorian date of Khao Phansa.
|
|
512
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
540
|
+
"""Calculate the estimated Gregorian date of Khao Phansa.
|
|
513
541
|
|
|
514
542
|
Also known as "(Start of) Buddhist Lent" and "Start of Vassa".
|
|
515
543
|
This coincides with the 1st Waning Day of Month 8
|
|
516
544
|
in Thai Lunar Calendar, or Month 8.8 in Athikamat years.
|
|
517
545
|
|
|
518
546
|
To calculate, we use use the following time delta:
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
547
|
+
|
|
548
|
+
* Athikamat:
|
|
549
|
+
1st Waning Day of Month 8.8 or 177[1-6] + 29[7] + 30[8] + 16[8.8] -1 = 251
|
|
550
|
+
|
|
551
|
+
* Athikawan:
|
|
552
|
+
1st Waning Day of Month 8 or 177[1-6] + 30[7] + 16[8] -1 = 222
|
|
553
|
+
|
|
554
|
+
* Pakatimat:
|
|
555
|
+
1st Waning Day of Month 8 or 177[1-6] + 29[7] + 16[8] -1 = 221
|
|
556
|
+
|
|
557
|
+
Or as in simpler terms: "Asarnha Bucha" +1
|
|
558
|
+
|
|
559
|
+
Args:
|
|
560
|
+
year:
|
|
561
|
+
The Gregorian year.
|
|
562
|
+
|
|
563
|
+
Returns:
|
|
531
564
|
Estimated Gregorian date of Khao Phansa.
|
|
565
|
+
Returns None if the Gregorian year input is invalid.
|
|
532
566
|
"""
|
|
533
567
|
start_date = self._get_start_date(year)
|
|
534
568
|
if not start_date:
|
|
@@ -543,26 +577,29 @@ class _ThaiLunisolar:
|
|
|
543
577
|
return _timedelta(start_date, delta_days)
|
|
544
578
|
|
|
545
579
|
def boun_haw_khao_padapdin_date(self, year: int) -> Optional[date]:
|
|
546
|
-
"""
|
|
547
|
-
Calculate the estimated Gregorian date of Boun Haw Khao Padapdin.
|
|
548
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
580
|
+
"""Calculate the estimated Gregorian date of Boun Haw Khao Padapdin.
|
|
549
581
|
|
|
550
582
|
Also known as "Boon Khao Padap Din".
|
|
551
583
|
This coincides with the 14th Waning Day of Month 9 in Thai Lunar Calendar.
|
|
552
584
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
585
|
+
To calculate, we use use the following time delta:
|
|
586
|
+
|
|
587
|
+
* Athikamat:
|
|
588
|
+
14th Waning Day of Month 9 or 236[1-8] + 30[8.8] + 29[9] -1 = 294
|
|
589
|
+
|
|
590
|
+
* Athikawan:
|
|
591
|
+
14th Waning Day of Month 9 or 236[1-8] + 1[7] + 29[9] -1 = 265
|
|
592
|
+
|
|
593
|
+
* Pakatimat:
|
|
594
|
+
14th Waning Day of Month 9 or 236[1-8] + 29[9] -1 = 264
|
|
560
595
|
|
|
561
|
-
:
|
|
562
|
-
|
|
596
|
+
Args:
|
|
597
|
+
year:
|
|
598
|
+
The Gregorian year.
|
|
563
599
|
|
|
564
|
-
:
|
|
600
|
+
Returns:
|
|
565
601
|
Estimated Gregorian date of Boun Haw Khao Padapdin.
|
|
602
|
+
Returns None if the Gregorian year input is invalid.
|
|
566
603
|
"""
|
|
567
604
|
start_date = self._get_start_date(year)
|
|
568
605
|
if not start_date:
|
|
@@ -577,26 +614,29 @@ class _ThaiLunisolar:
|
|
|
577
614
|
return _timedelta(start_date, delta_days)
|
|
578
615
|
|
|
579
616
|
def boun_haw_khao_salark_date(self, year: int) -> Optional[date]:
|
|
580
|
-
"""
|
|
581
|
-
Calculate the estimated Gregorian date of Boun Haw Khao Salark.
|
|
582
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
617
|
+
"""Calculate the estimated Gregorian date of Boun Haw Khao Salark.
|
|
583
618
|
|
|
584
619
|
Also known as "Boon Khao Sak".
|
|
585
620
|
This coincides with the 15th Waxing Day of Month 10 in Thai Lunar Calendar.
|
|
586
621
|
|
|
587
|
-
|
|
588
|
-
- Athikamat: 15th Waxing Day of Month 10
|
|
589
|
-
or 265[1-9] + 30[8.8] + 15[10] -1 = 309
|
|
590
|
-
- Athikawan: 15th Waxing Day of Month 10
|
|
591
|
-
or 265[1-9] + 1[7] + 15[10] -1 = 280
|
|
592
|
-
- Pakatimat: 15th Waxing Day of Month 10
|
|
593
|
-
or 265[1-9] + 15[10] -1 = 279
|
|
622
|
+
To calculate, we use use the following time delta:
|
|
594
623
|
|
|
595
|
-
|
|
596
|
-
|
|
624
|
+
* Athikamat:
|
|
625
|
+
15th Waxing Day of Month 10 or 265[1-9] + 30[8.8] + 15[10] -1 = 309
|
|
597
626
|
|
|
598
|
-
:
|
|
599
|
-
|
|
627
|
+
* Athikawan:
|
|
628
|
+
15th Waxing Day of Month 10 or 265[1-9] + 1[7] + 15[10] -1 = 280
|
|
629
|
+
|
|
630
|
+
* Pakatimat:
|
|
631
|
+
15th Waxing Day of Month 10 or 265[1-9] + 15[10] -1 = 279
|
|
632
|
+
|
|
633
|
+
Args:
|
|
634
|
+
year:
|
|
635
|
+
The Gregorian year.
|
|
636
|
+
|
|
637
|
+
Returns:
|
|
638
|
+
Estimated Gregorian date of Boun Haw Khao Salark.
|
|
639
|
+
Returns None if the Gregorian year input is invalid.
|
|
600
640
|
"""
|
|
601
641
|
start_date = self._get_start_date(year)
|
|
602
642
|
if not start_date:
|
|
@@ -611,26 +651,29 @@ class _ThaiLunisolar:
|
|
|
611
651
|
return _timedelta(start_date, delta_days)
|
|
612
652
|
|
|
613
653
|
def pchum_ben_date(self, year: int) -> Optional[date]:
|
|
614
|
-
"""
|
|
615
|
-
Calculate the estimated Gregorian date of Pchum Ben.
|
|
616
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
654
|
+
"""Calculate the estimated Gregorian date of Pchum Ben.
|
|
617
655
|
|
|
618
656
|
Also known as "Prachum Bandar".
|
|
619
657
|
This coincides with the 15th Waning Day of Month 10 in Thai Lunar Calendar.
|
|
620
658
|
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
or 265[1-9] + 1[7] + 30[10] -1 = 295
|
|
626
|
-
- Pakatimat: 15th Waning Day of Month 10
|
|
627
|
-
or 265[1-9] + 30[10] -1 = 294
|
|
659
|
+
To calculate, we use use the following time delta:
|
|
660
|
+
|
|
661
|
+
* Athikamat:
|
|
662
|
+
15th Waning Day of Month 10 or 265[1-9] + 30[8.8] + 30[10] -1 = 324
|
|
628
663
|
|
|
629
|
-
|
|
630
|
-
|
|
664
|
+
* Athikawan:
|
|
665
|
+
15th Waning Day of Month 10 or 265[1-9] + 1[7] + 30[10] -1 = 295
|
|
631
666
|
|
|
632
|
-
:
|
|
667
|
+
* Pakatimat:
|
|
668
|
+
15th Waning Day of Month 10 or 265[1-9] + 30[10] -1 = 294
|
|
669
|
+
|
|
670
|
+
Args:
|
|
671
|
+
year:
|
|
672
|
+
The Gregorian year.
|
|
673
|
+
|
|
674
|
+
Returns:
|
|
633
675
|
Estimated Gregorian date of Pchum Ben.
|
|
676
|
+
Returns None if the Gregorian year input is invalid.
|
|
634
677
|
"""
|
|
635
678
|
start_date = self._get_start_date(year)
|
|
636
679
|
if not start_date:
|
|
@@ -645,26 +688,29 @@ class _ThaiLunisolar:
|
|
|
645
688
|
return _timedelta(start_date, delta_days)
|
|
646
689
|
|
|
647
690
|
def ok_phansa_date(self, year: int) -> Optional[date]:
|
|
648
|
-
"""
|
|
649
|
-
Calculate the estimated Gregorian date of Ok Phansa.
|
|
650
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
691
|
+
"""Calculate the estimated Gregorian date of Ok Phansa.
|
|
651
692
|
|
|
652
693
|
Also known as "End of Buddhist Lent" and "End of Vassa".
|
|
653
694
|
This coincides with the 15th Waxing Day of Month 11 in Thai Lunar Calendar.
|
|
654
695
|
|
|
655
696
|
To calculate, we use use the following time delta:
|
|
656
|
-
- Athikamat: 15th Waxing Day of Month 11
|
|
657
|
-
or 295[1-10] + 30[8.8] + 15[11] -1 = 339
|
|
658
|
-
- Athikawan: 15th Waxing Day of Month 11
|
|
659
|
-
or 295[1-10] + 1[7] + 15[11] -1 = 310
|
|
660
|
-
- Pakatimat: 15th Waxing Day of Month 11
|
|
661
|
-
or 295[1-10] + 15[11] -1 = 309
|
|
662
697
|
|
|
663
|
-
|
|
664
|
-
|
|
698
|
+
* Athikamat:
|
|
699
|
+
15th Waxing Day of Month 11 or 295[1-10] + 30[8.8] + 15[11] -1 = 339
|
|
665
700
|
|
|
666
|
-
:
|
|
701
|
+
* Athikawan:
|
|
702
|
+
15th Waxing Day of Month 11 or 295[1-10] + 1[7] + 15[11] -1 = 310
|
|
703
|
+
|
|
704
|
+
* Pakatimat:
|
|
705
|
+
15th Waxing Day of Month 11 or 295[1-10] + 15[11] -1 = 309
|
|
706
|
+
|
|
707
|
+
Args:
|
|
708
|
+
year:
|
|
709
|
+
The Gregorian year.
|
|
710
|
+
|
|
711
|
+
Returns:
|
|
667
712
|
Estimated Gregorian date of Ok Phansa.
|
|
713
|
+
Returns None if the Gregorian year input is invalid.
|
|
668
714
|
"""
|
|
669
715
|
start_date = self._get_start_date(year)
|
|
670
716
|
if not start_date:
|
|
@@ -679,26 +725,29 @@ class _ThaiLunisolar:
|
|
|
679
725
|
return _timedelta(start_date, delta_days)
|
|
680
726
|
|
|
681
727
|
def boun_suang_heua_date(self, year: int) -> Optional[date]:
|
|
682
|
-
"""
|
|
683
|
-
Calculate the estimated Gregorian date of Ok Boun Suang Huea.
|
|
684
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
728
|
+
"""Calculate the estimated Gregorian date of Ok Boun Suang Huea.
|
|
685
729
|
|
|
686
730
|
Boun Suang Huea Nakhone Luang Prabang, also known as "Vientiane Boat Racing Festival".
|
|
687
731
|
This coincides with the 1st Waning Day of Month 11 in Thai Lunar Calendar.
|
|
688
732
|
|
|
689
733
|
To calculate, we use use the following time delta:
|
|
690
|
-
- Athikamat: 1st Waning Day of Month 11
|
|
691
|
-
or 295[1-10] + 30[8.8] + 16[11] -1 = 340
|
|
692
|
-
- Athikawan: 1st Waning Day of Month 11
|
|
693
|
-
or 295[1-10] + 1[7] + 16[11] -1 = 311
|
|
694
|
-
- Pakatimat: 1st Waning Day of Month 11
|
|
695
|
-
or 295[1-10] + 16[11] -1 = 310
|
|
696
734
|
|
|
697
|
-
|
|
698
|
-
|
|
735
|
+
* Athikamat:
|
|
736
|
+
1st Waning Day of Month 11 or 295[1-10] + 30[8.8] + 16[11] -1 = 340
|
|
737
|
+
|
|
738
|
+
* Athikawan:
|
|
739
|
+
1st Waning Day of Month 11 or 295[1-10] + 1[7] + 16[11] -1 = 311
|
|
740
|
+
|
|
741
|
+
* Pakatimat:
|
|
742
|
+
1st Waning Day of Month 11 or 295[1-10] + 16[11] -1 = 310
|
|
699
743
|
|
|
700
|
-
:
|
|
744
|
+
Args:
|
|
745
|
+
year:
|
|
746
|
+
The Gregorian year.
|
|
747
|
+
|
|
748
|
+
Returns:
|
|
701
749
|
Estimated Gregorian date of Boun Suang Huea.
|
|
750
|
+
Returns None if the Gregorian year input is invalid.
|
|
702
751
|
"""
|
|
703
752
|
start_date = self._get_start_date(year)
|
|
704
753
|
if not start_date:
|
|
@@ -713,26 +762,29 @@ class _ThaiLunisolar:
|
|
|
713
762
|
return _timedelta(start_date, delta_days)
|
|
714
763
|
|
|
715
764
|
def loy_krathong_date(self, year: int) -> Optional[date]:
|
|
716
|
-
"""
|
|
717
|
-
Calculate the estimated Gregorian date of Loy Krathong.
|
|
718
|
-
If the Gregorian year input is invalid, this will outputs None instead.
|
|
765
|
+
"""Calculate the estimated Gregorian date of Loy Krathong.
|
|
719
766
|
|
|
720
767
|
Also known as "Boun That Louang" and "Bon Om Touk".
|
|
721
768
|
This coincides with the 15th Waxing Day of Month 12 in Thai Lunar Calendar.
|
|
722
769
|
|
|
723
770
|
To calculate, we use use the following time delta:
|
|
724
|
-
- Athikamat: 15th Waxing Day of Month 12
|
|
725
|
-
or 324[1-11] + 30[8.8] + 15[11] -1 = 368
|
|
726
|
-
- Athikawan: 15th Waxing Day of Month 12
|
|
727
|
-
or 324[1-11] + 1[7] + 15[11] -1 = 339
|
|
728
|
-
- Pakatimat: 15th Waxing Day of Month 12
|
|
729
|
-
or 324[1-11] + 15[11] -1 = 338
|
|
730
771
|
|
|
731
|
-
|
|
732
|
-
|
|
772
|
+
* Athikamat:
|
|
773
|
+
15th Waxing Day of Month 12 or 324[1-11] + 30[8.8] + 15[11] -1 = 368
|
|
774
|
+
|
|
775
|
+
* Athikawan:
|
|
776
|
+
15th Waxing Day of Month 12 or 324[1-11] + 1[7] + 15[11] -1 = 339
|
|
777
|
+
|
|
778
|
+
* Pakatimat:
|
|
779
|
+
15th Waxing Day of Month 12 or 324[1-11] + 15[11] -1 = 338
|
|
780
|
+
|
|
781
|
+
Args:
|
|
782
|
+
year:
|
|
783
|
+
The Gregorian year.
|
|
733
784
|
|
|
734
|
-
:
|
|
785
|
+
Returns:
|
|
735
786
|
Estimated Gregorian date of Loy Krathong.
|
|
787
|
+
Returns None if the Gregorian year input is invalid.
|
|
736
788
|
"""
|
|
737
789
|
start_date = self._get_start_date(year)
|
|
738
790
|
if not start_date:
|