Is there any library or algorithm for Persian (Shamsi or Jalali) calendar in Android? [closed]

I’m using this algorithm for years and it is very accurate between 1901 and 2099. Use it and Enjoy! 🙂 public class Utilities { private class SolarCalendar { public String strWeekDay = “”; public String strMonth = “”; int date; int month; int year; public SolarCalendar() { Date MiladiDate = new Date(); calcSolarCalendar(MiladiDate); } public … Read more

How to convert Persian and Arabic digits of a string to English using JavaScript?

Oneliner of all 6 possible translations between English, Arabic, and persian Digits. const e2p = s => s.replace(/\d/g, d => ‘Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹'[d]) const e2a = s => s.replace(/\d/g, d => ‘٠١٢٣٤٥٦٧٨٩'[d]) const p2e = s => s.replace(/[Û°-Û¹]/g, d => ‘Û°Û±Û²Û³Û´ÛµÛ¶Û·Û¸Û¹’.indexOf(d)) const a2e = s => s.replace(/[Ù -Ù©]/g, d => ‘٠١٢٣٤٥٦٧٨٩’.indexOf(d)) const p2a = s => s.replace(/[Û°-Û¹]/g, d … Read more

How to support Arabic text in Android?

Android 2.1 does not have Arabic font. Android 2.2 has Arabic font but does not show your word correctly. Android 3.x supports Arabic completely. For Android 2.1 you must set the typeface Farsi.GetFarsiFont(this) and then use Farsi.Convert(“سلام”) For Android 2.2 you do not need setting font but must use Farsi.Convert(“سلام”) And for Android 3.x forget … Read more