---
id: "date_thai"
kind: "pattern"
status: "draft"
is_pii: false
name: "Date with a Thai month name"
regexp: "^(?:0?[1-9]|[12]\\d|3[01])[ -]?(?:มกราคม|กุมภาพันธ์|มีนาคม|เมษายน|พฤษภาคม|มิถุนายน|กรกฎาคม|สิงหาคม|กันยายน|ตุลาคม|พฤศจิกายน|ธันวาคม|ม\\.?ค\\.?|ก\\.?พ\\.?|มี\\.?ค\\.?|เม\\.?ย\\.?|พ\\.?ค\\.?|มิ\\.?ย\\.?|ก\\.?ค\\.?|ส\\.?ค\\.?|ก\\.?ย\\.?|ต\\.?ค\\.?|พ\\.?ย\\.?|ธ\\.?ค\\.?)[ -]?(?:\\d{2}|2[4-6]\\d{2})$"
categories: ["datetime"]
langs: ["th"]
quality: 90
url: "https://registry.apicrafter.io/datatype/date_thai"
---

# Date with a Thai month name (`date_thai`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Calendar date written with the day, the Thai name or abbreviation of the month and the year, which is in the Buddhist era and has four or two digits: 24 กรกฎาคม 2566, 17 มิ.ย. 2556, 1-พ.ย.-65. Spreadsheets exported with a Thai locale write the short form with hyphens.

- Pattern of: [`date`](https://registry.apicrafter.io/datatype/date.md)
- Personal data (PII): no
- Categories: Date and time (datetime)
- Countries: global
- Languages: Thai (th)

## Detection

Regular expression (Python `re`):

```
^(?:0?[1-9]|[12]\d|3[01])[ -]?(?:มกราคม|กุมภาพันธ์|มีนาคม|เมษายน|พฤษภาคม|มิถุนายน|กรกฎาคม|สิงหาคม|กันยายน|ตุลาคม|พฤศจิกายน|ธันวาคม|ม\.?ค\.?|ก\.?พ\.?|มี\.?ค\.?|เม\.?ย\.?|พ\.?ค\.?|มิ\.?ย\.?|ก\.?ค\.?|ส\.?ค\.?|ก\.?ย\.?|ต\.?ค\.?|พ\.?ย\.?|ธ\.?ค\.?)[ -]?(?:\d{2}|2[4-6]\d{2})$
```

## Examples

- `24 กรกฎาคม 2566` — 24 July 2023
- `17 มิ.ย.2556` — 17 June 2013
- `1-พ.ย.-65` — 1 November 2022 (2565), the short form of spreadsheets
- `24 July 2023` (invalid example) — an English month name

## Metacrafter rules

1 rules: 0 match the field name, 1 match values.

- `thdatethaivalue` (data, `th/th_datetime.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- th: วันที่ (ชื่อเดือนภาษาไทย)
- ru: Дата с тайским названием месяца

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Thai_solar_calendar>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/date_thai.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/datetime/date_thai.yaml>
