Skip to content

ICU-11533 Myanmar / Burmese calendar support#4074

Open
mapmeld wants to merge 4 commits into
unicode-org:mainfrom
Georeactor:buddhist-hack
Open

ICU-11533 Myanmar / Burmese calendar support#4074
mapmeld wants to merge 4 commits into
unicode-org:mainfrom
Georeactor:buddhist-hack

Conversation

@mapmeld

@mapmeld mapmeld commented Jul 10, 2026

Copy link
Copy Markdown

Background

A while ago I proposed PR #630 to add the Myanmar lunar-based calendar (aka Burmese calendar) to ICU. This calendar is frequently used for birthdays and on official documents.
After difficulties with supporting and testing a complete calendar, I closed the PR in 2024.
(Last year I suggested changing only the year in #3482 , which was rejected)

The reference for this work is https://github.com/yan9a/mmcal , an open source C++/JS project which gave their permission.

What's new?

  • I squashed my previous work and tests into one commit.
  • I gave Copilot access to the mmcal JS file, my previous work, and my existing tests. This addressed two problems which I have had for a long time: defining the min and max calendar limits, and implementation of leap years.
  • Final commit is cleanup after rebasing to 2026 and removing comments/whitespace (also AI assisted)

On AI assistance:

  • The original tests and framework are still there. The JS spec is a human-written reference.
  • From the beginning of this process, I have said that my obstacle was understanding the test system, both for parsing 1000s of lines of limit failures, secondly for testing this PR and not the full test suite. This made my dev process / iteration very slow.
  • For developers who aren't familiar with this process, my process includes reverting and pushing back on AI recommendations until the approach is reasonable and minimal.
  • Finally, I have written this message you're reading now without consulting the AI. I've reviewed the files changed by the PR. If you see the previous PRs it is very similar. I will continue communicating with you personally.

Checklist

  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

monthNames:alias{"/LOCALE/calendar/gregorian/monthNames"}
quarters:alias{"/LOCALE/calendar/gregorian/quarters"}
}
myanmar{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should go into CLDR-8081 first, as this file (root.txt) is generated from there.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I faintly remembered I had a PR for CLDR. I am updating the commit to add names for the months to my.xml
unicode-org/cldr#3806

Comment on lines +808 to +809
// Test various dates to be sure of validity
int32_t data[] = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mentioned issues with testing. Note that ICU4C testing can use json now, https://github.com/unicode-org/icu/blob/main/icu4c/source/test/intltest/messageformat2test_read_json.cpp for example. So the test data could be in a json file if that helps.

@srl295

srl295 commented Jul 11, 2026

Copy link
Copy Markdown
Member

oh and hi again 👋

@richgillam

richgillam commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Is there a ticket filed for this change, and can you link it to this PR?

For CLDR it's CLDR-8081 and the PR is https://github.com/unicode-org/cldr/pull/3806/changes

The CLDR Design Working Group would like to see a formal proposal for this new addition, and for the structure of the necessary data in in CLDR and don't want to see this merged in the meantime.

The PR has a description.

@DraganBesevic

Copy link
Copy Markdown
Contributor

I have a couple of questions. What is the reference source for this calendar you used to verify you're getting correct dates? Did you verify it over the wider range of dates, or only spot checked?

Also, I would like to see some unit tests for add() and roll(). I noticed that you didn't add any overrides for those two methods, so I am curios if that works as is, especially at leap years' boundaries and similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants