https://bugs.documentfoundation.org/show_bug.cgi?id=172535
Bug ID: 172535
Summary: Thai Buddhist Calendar (พ.ศ.) date formatting does not
account for the historical New Year change in 1941
(B.E. 2484)
Product: LibreOffice
Version: 26.2.4.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Description:
Currently, when formatting dates using the Thai Buddhist Calendar (Locale:
Thai) in LibreOffice Calc, the software relies on a naive global offset of
adding 543 years to the Gregorian calendar year (B.E. = C.E. + 543) across all
historical timelines.While this simple formula works perfectly for modern
dates, it creates inaccurate historical date representations for dates prior to
January 1, 1941 (B.E. 2484).Historically, Thailand shifted its official New
Year's Day several times:Prior to April 1, 1941 (B.E. 2484): The Thai New
Year's Day was officially April 1st. Therefore, the months of January,
February, and March belonged to the previous Buddhist Era year compared to the
current modern calculation.From January 1, 1941 onwards: The New Year was
officially synchronized with the Western Gregorian Calendar (January 1st).As a
consequence of this decree by the Thai government, the year B.E. 2483 (C.E.
1940) only had 9 months (April 1940 – December 1940). The months of January,
February, and March 1941 became the start of B.E. 2484.
[Impact on Calc]When historical data is entered in C.E. and formatted to Thai
Buddhist calendar style, the dates between January 1st and March 31st for any
year prior to 1941 display incorrect B.E. years.Example 1 (The bug
context):Input: 1921-01-06 (January 6, 1921)Current LibreOffice Output (Naive
+543): 6 มกราคม พ.ศ. 2464Correct Historical Thai Output: 6 มกราคม พ.ศ. 2463
(Because in Jan 1921, Thailand had not yet celebrated the New Year on April
1st).Example 2 (The missing months):Input: 1940-01-15 (January 15, 1940)Current
LibreOffice Output: 15 มกราคม พ.ศ. 2483Correct Historical Thai Output: 15
มกราคม พ.ศ. 2482
Steps to Reproduce:
1. Open LibreOffice Calc.In cell A1, enter the Gregorian date: 1921-01-06.
2. Right-click the cell, select Format Cells -> Numbers tab.Set Language/Locale
to Thai and choose a Date format that displays the year (e.g., [~buddhist]D
MMMM YYYY).Observe the year displayed.
Actual Results:
6 January 1921 displays 6 มกราคม 2464.
Expected Results:
6 January 1921 displays 6 มกราคม 2463.
The date engine inside LibreOffice (specifically under the i18n or locale-aware
date calculation module) should handle the pre-1941 Thai calendar cutoff
properly:
For any Gregorian date on or after 1941-01-01, apply B.E. = C.E. + 543.
For any Gregorian date before 1941-01-01:If Month is January, February, or
March, apply B.E. = C.E. + 542.If Month is April through December, apply B.E. =
C.E. + 543.
Reproducible: Always
User Profile Reset: No
Additional Info:
[Additional Reference]The Prime Minister's Office Decree on Changing the Thai
New Year's Day was enacted on December 24, 1940 (B.E. 2483), declaring January
1, 1941, as the official start of B.E. 2484. This historical shift is
standardized and universally accepted in Thai historiography and legal
contexts.
Historical Reference for Developers:April 1, 1889 (B.E. 2432): First official
day of the fixed Thai solar calendar. Previously, Thailand used a lunar
calendar.
Transition of B.E. 2483: Due to the 1941 shift, the year B.E. 2483 in Thailand
was a short year containing only 9 months (April 1, 1940 – December 31, 1940).
The months of January, February, and March B.E. 2483 do not exist in Thai
history; they became January–March B.E. 2484.
Impact:This discrepancy introduces serious chronological errors for historians,
legal professionals, and government officers in Thailand who use LibreOffice
Calc to catalog pre-WWII official documents, royal decrees, and historical
birth certificates.
--
You are receiving this mail because:
You are the assignee for the bug.