bug(date) incorrectly converts `%Y` to the Thai Buddhist calendar when `LC_TIME=th_TH.UTF-8` is set.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Reproducer
$ locale -k LC_TIME
abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"
mon="January;February;March;April;May;June;July;August;September;October;November;December"
era=
alt_digits=
env -u LC_ALL LC_TIME=th_TH.UTF-8 \
./target/release/date -d "2026-06-14" "+%Y %B %A"
Actual output
2569 มิถุนายน วันอาทิตย์
Expected output
2026 June Sunday
GNU comparison
env -u LC_ALL LC_TIME=th_TH.UTF-8 \
date -d "2026-06-14" "+%Y %B %A"
GNU date prints:
2026 June Sunday
Notes
The active LC_TIME data contains:
mon="January;February;March;April;May;June;July;August;September;October;November;December"
day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday"
era=
alt_digits=
However, uutils prints a Buddhist Era year (2569) and Thai month/weekday names.
This suggests that the formatter is not honoring the active locale data and is instead deriving formatting behavior directly from the locale identifier (th_TH.UTF-8).
Expected behavior is to match GNU date and use the values provided by the active LC_TIME definition.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided ./target/release/date reproducer with LC_TIME=th_TH.UTF-8, then compare its output with GNU date and the active LC_TIME values from locale -k LC_TIME. Done means %Y %B %A produces 2026 June Sunday instead of the Buddhist year and Thai names while preserving the locale behavior described by the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100