Last active
August 21, 2026 14:44
-
-
Save eimg/35a632807e0451740c0893e40762f18b to your computer and use it in GitHub Desktop.
Convert Myanmar numbers to English numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // INPUT: ၁၁.၁၂.၂၀၁၇ | |
| // OUTPUT: 11.12.2017 | |
| function mm2en(num) { | |
| var nums = { '၀': '0', '၁': 1, '၂': 2, '၃': 3, '၄': 4 , '၅': 5, '၆': 6, '၇':7, '၈':8, '၉':9 }; | |
| return num.replace(/([၀-၉])/g, function(s, key) { | |
| return nums[key] || s; | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
၁,၀၀၀,၀၀၀
၁,၀၀၀,၀၀၀
၆၀၀၀၀၀
၅၀၀,၀၀၀
၅၀၀,၀၀၀
၄၀၀,၀၀၀
၄၀၀,၀၀၀
၂၅၀,၀၀၀
၂၅၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၁၅၀,၀၀၀
၁၅၀,၀၀၀
၁၅၀,၀၀၀
၁၅၀,၀၀၀
၁၅၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၁၀၀,၀၀၀
၂၀၀,၀၀၀
၂,၀၀၀,၀၀၀
၁,၀၀၀,၀၀၀
၅၀၀,၀၀၀
၅၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀
၂၀၀,၀၀၀