thai-date-format
Skill4 starsChanged 2 months agoMITView on GitHub
Use this skill for any task converting between Buddhist Era (พ.ศ.) and Common Era (ค.ศ.) years, or formatting a date the way a Thai document, business, or casual context expects. Trigger on "แปลงปี พ.ศ.", "แปลง ค.ศ.", "วันที่แบบไทย", "วันที่ราชการ", "เลขไทย", "Thai date", "BE to CE", "Buddhist Era", or any date that mixes a 4-digit year starting with 25xx with a request to write or read it in Thai. If the task is just generic date-string formatting with no Thai era or numeral involved, plain ISO/locale formatting is enough — this skill is not needed.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Boom-Vitt/claude-thai-skillstheir own version, first seen Nov 1, 2026
- Aether-GenesiZ/thai-agent-skillstheir own version, first seen Nov 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Boom-Vitt/claude-thai-skills★ 58same name
- Aether-GenesiZ/thai-agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository58 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/project-docs-prep/templates/AGENTS.mdAGENTS.md
- skills/project-docs-prep/templates/CLAUDE.mdCLAUDE.md
- deep-planningSkill
- deep-planningSkill
- deprecatedSkill
- architecture-reviewSkill
- code-reviewSkill
- diagnoseSkill
- tddSkill
- ui-design-engineeringSkill
- ux-ui-design-assessmentSkill
- in-progressSkill
- mcp-tool-managementSkill
- skill-managementSkill
- obsidian-canvasSkill
- obsidian-markdownSkill
- obsidian-notion-bridgeSkill
- obsidian-vault-workflowSkill
- boomz-preferencesSkill
- personal-agent-workflowSkill
- personalSkill
- automation-designSkill
- grill-with-docsSkill
- handoffSkill
- inbox-meeting-triageSkill
- markdown-reportSkill
- prompt-improvementSkill
- project-docs-prepSkill
- claim-citation-checkSkill
- daily-news-reportSkill
- github-skill-researchSkill
- project-discoverySkill
- repo-tourSkill
- research-methodologySkill
- seo-website-evaluatorSkill
- thaiSkill
- thai-addressSkill
- thai-customer-serviceSkill
- thai-festival-cardSkill
- thai-government-formSkill
- thai-id-validateSkill
- thai-invoiceSkill
- thai-pdpaSkill
- thai-resumeSkill
- thai-social-captionSkill
- thai-text-processingSkill
- thai-translateSkill
- backtest-expertSkill
- dividend-value-screenerSkill
- drawdown-circuit-breakerSkill
- exposure-coachSkill
- market-breadth-analyzerSkill
- portfolio-managerSkill
- position-sizerSkill
- tradingSkill
- trader-memory-coreSkill
- uptrend-analyzerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
Month names: use the full form (มกราคม, กุมภาพันธ์, ...) for formal style, abbreviated form (ม.ค., ก.พ., ...) for business style — see …
- Very specific: line 59
Run python3 convert.py for the self-test.
- Distinctive: line 63
Does not model the pre-1941 Thai New Year date shift (see Core knowledge above).
- Distinctive: line 64
Does not handle the Thai lunar calendar (religious holiday dates like Songkran-adjacent lunar observances need a separate lunar-calendar …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Thai Date Format (พ.ศ. ↔ ค.ศ.)
Overview
Thai documents, forms, and casual writing use the Buddhist Era (พุทธศักราช, พ.ศ. = ค.ศ. + 543), not the Common Era Claude defaults to. A model without this skill routinely writes 2025 in a Thai government letter (should be ๒๕๖๘ or 2568), or converts a Thai year by guessing instead of the fixed +543 offset. This skill gives the exact offset, the three common display styles, and Thai numeral rendering.
When to use
- แปลงปี 2568 (พ.ศ.) เป็น ค.ศ., or the reverse
- เขียนวันที่แบบราชการ / business / casual ในเอกสารไทย
- Formatting a date for a Thai form, invoice, resume, or letter (often needed together with
thai-invoiceorthai-government-form) - Rendering a number using Thai digit glyphs (๐-๙), e.g. for a formal document or engraving
- Parsing a Thai-formatted date string back into a usable date value
When NOT to use
- The task is pure English/ISO date handling with no Thai era or numeral involved
- The task needs Thai lunar/astrological calendar dates (Thai solar calendar with BE offset is a different system from the lunar calendar used for Buddhist holy days) — flag this distinction to the user rather than guessing a lunar date
Core knowledge
- Offset:
BE = CE + 543. Example: 2025 CE = 2568 BE. This is a fixed arithmetic offset for the modern calendar. - Historical caveat: Thailand moved New Year's Day from 1 April to 1 January starting BE 2484 (1 Jan 1941 CE). For any date on or after 1 Jan 1941, the fixed
+543offset holds for the whole year. For dates before that, Jan-Mar fell in the previous BE year under the old calendar — this skill does not model that historical edge case; flag it if a user asks about a pre-1941 date. Display styles:
Style Example Where used Formal (ราชการ) 16 พฤษภาคม 2568Government letters, official documents, formal invitations Business 16 พ.ค. 68Invoices, receipts, business correspondence Casual 16/5/68Chat, informal notes, UI date pickers ISO/CE 2025-05-16Machine interchange, APIs, databases — never show this to a Thai reader as "the date" without conversion - Thai numerals (๐๑๒๓๔๕๖๗๘๙): optional glyph set, mostly used in royal/ceremonial documents, some government forms, and stylized design. Default to Arabic numerals (0-9) even in Thai-language text — that is the actual norm in everyday Thai documents; only switch to Thai digits when the user asks or the context is clearly ceremonial/formal government.
- Month names: use the full form (มกราคม, กุมภาพันธ์, ...) for formal style, abbreviated form (ม.ค., ก.พ., ...) for business style — see
convert.py:THAI_MONTHS_FULL/THAI_MONTHS_ABBRfor the full list.
Common mistakes
- Writing the CE year in a Thai formal document instead of converting to BE.
- Getting the offset backwards (subtracting 543 from a CE year instead of adding).
- Defaulting to Thai numeral glyphs everywhere — most real Thai documents use Arabic digits.
- Truncating the BE year to 2 digits without checking the style calls for it (formal style always uses the full 4-digit BE year).
- Confusing the Buddhist Era solar calendar (fixed +543 offset, same months as CE) with the Thai lunar calendar used for religious holidays — they are not interchangeable.
- Applying the +543 offset to a pre-1941 date without accounting for the old April New Year.
Code
convert.py — no dependencies, pure stdlib:
ce_to_be(ce_year)/be_to_ce(be_year)— year offset conversionto_thai_digits(value)/from_thai_digits(text)— Arabic ↔ Thai numeral glyphsThaiDate.from_date(date).format(style="formal"|"business"|"casual"|"iso_ce", numerals="arabic"|"thai")format_date(date, style=..., numerals=...)— convenience wrapper
Run python3 convert.py for the self-test.
Known limitations
- Does not model the pre-1941 Thai New Year date shift (see Core knowledge above).
- Does not handle the Thai lunar calendar (religious holiday dates like Songkran-adjacent lunar observances need a separate lunar-calendar lookup, not this offset).
- Checked against the standard
CE + 543Buddhist Era rule, which is stable and not subject to legislative change — no re-verification cadence needed for the offset itself, but month-name spelling conventions should be spot-checked against a current Royal Institute Dictionary source if used in a legal document.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

