Closed 4i8 closed 1 year ago
This was intentionally changed in 77daebbaee960734d137b1eaf4c91b89fe44fd8f.
I do not know much about Arabic. Do people use different numerals in different places?
This was intentionally changed in 77daebb.
I do not know much about Arabic. Do people use different numerals in different places?
Some, but most use Arabic numerals 0123456789
What if we added an option to change the digits used?
What if we added an option to change the digits used?
Good idea, I will work on improving the Arabic texts to be more accurate
1234567890 and ١٢٣٤٥٦٧٨٩٠ => Also Arabic
But ١٢٣٤٥٦٧٨٩٠ makes texts Unbalanced with other texts in most interfaces مرحبا Test ١٢٣٤٥٦٧٨٩٠ مرحبا 1234567890 Test Which makes style bad
1234567890 => Muhammad bin Musa Al-Khwarizmi ' Mathematician ١٢٣٤٥٦٧٨٩٠ => Ibrahim Al-Fazari ' Astronomer
I will look into fixing this soon.
I just released version 3.29.0. It adds the digitreplacements
option which should help you.
humanizeDuration(97320000, { language: "ar" });
// => "١ يوم ﻭ ٣ ساعات ﻭ ٢ دقيقتان"
humanizeDuration(97320000, { language: "ar", digitReplacements: "0123456789" });
// => "1 يوم ﻭ 3 ساعات ﻭ 2 دقيقتان"
I'm going to close this pull request because I think I have solved your problem.
~~["۰", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"]; this is not arabic numbers ,The numbers used worldwide are Arabic numerals. 0123456789~~ 1234567890 and ١٢٣٤٥٦٧٨٩٠ => Also Arabic But ١٢٣٤٥٦٧٨٩٠ makes texts Unbalanced with other texts in most interfaces مرحبا Test ١٢٣٤٥٦٧٨٩٠ مرحبا 1234567890 Test Which makes style bad
1234567890 => Muhammad bin Musa Al-Khwarizmi 'Mathematician ١٢٣٤٥٦٧٨٩٠ => Ibrahim Al-Fazari'Astronomer