{"repo":"majiidd/persiantools","free":true,"listed":false,"github":"https://github.com/majiidd/persiantools","clone":"git clone https://github.com/majiidd/persiantools.git","description":"Jalali (Shamsi/Persian) date and datetime with Persian digits and character utilities","language":"Python","stars":225,"topics":["python","persian","datetime","jalali","jalali-datetime","jdate","jdatetime","shamsi","persiantools","gregorian"],"license":"MIT","category":"productivity","readme_excerpt":"PersianTools PersianTools provides Jalali (Shamsi) dates and datetimes that work just like Python's datetime — plus handy tools for Persian text: digit conversion between Persian, Arabic, and English, character normalization, and numbers to Persian words. If you know datetime.date and datetime.datetime , you already know JalaliDate and JalaliDateTime . They support the same operations: comparison, arithmetic with timedelta , timezones, strftime / strptime and formatting, hashing, and pickling. Installation Requires Python 3.9 or newer. No dependencies, except tzdata on Windows for timezone data. Quick start Dates Create a JalaliDate from Jalali values, a Gregorian date, an ISO string, or a timestamp: The week starts on Shanbeh (Saturday). weekday() counts from 0 (Shanbeh) to 6 (Jomeh), and isoweekday() from 1 to 7: Datetimes JalaliDateTime adds time and timezone support on top of JalaliDate : Formatting and parsing Both classes support strftime and strptime with the familiar directives, in English or Persian: A date created with locale=\"fa\" renders itself with Persian digits and names everywhere: Comparison and arithmetic Jalali objects compare and do arithmetic with each other, with timedelta , and directly with their Gregorian counterparts: They are also hashable (usable as dict keys) and picklable, like the standard library types. Digits Convert digits between English, Persian, and Arabic: And spell numbers out in Persian — integers, floats, and negatives: Characters Arabi","default_branch":null,"files":null,"tree":[],"storefront":"/r/majiidd","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/majiidd/persiantools/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}