![]() ![]() %f %p %z %Z" ) '01:49:22.518523 PM +0000 UTC' Digits/Characters Tools > from persiantools import characters, digits > digits. utc ) JalaliDateTime ( 1395, 4, 17, 21, 23, 53, 474618, tzinfo = ) Formatīased on python strftime() behavior > from persiantools.jdatetime import JalaliDate, JalaliDateTime > import pytz > JalaliDate ( 1367, 2, 14 ). timezone ( "Asia/Tehran" )) # Timestamp to Jalali JalaliDateTime ( 1367, 2, 14, 8, 0, tzinfo = ) > JalaliDateTime. to_gregorian () # Jalali to Gregorian datetime. fromtimestamp ( 578707200 ) # Timestamp to Jalali JalaliDate ( 1367, 2, 14, Chaharshanbeh ) Datetime > from persiantools.jdatetime import JalaliDateTime > import datetime, pytz > JalaliDateTime. date ( 1990, 9, 23 )) # Gregorian to Jalali JalaliDate ( 1369, 7, 1, Yekshanbeh ) > JalaliDate. today () JalaliDate ( 1395, 4, 18, Jomeh ) > JalaliDate ( 1369, 7, 1 ) JalaliDate ( 1369, 7, 1, Yekshanbeh ) > JalaliDate ( datetime. ( for python 2.7 and 3.5 use 1.5.x version) How to use Date > from persiantools.jdatetime import JalaliDate > import datetime > JalaliDate. Install Package python -m pip install persiantools Support comparison and arithmetic operators such as +, -, =, >=Ĭonvert Arabic and Persian characters/digits to each other.Convert Jalali to Gregorian date/datetime and vice versa.Jalali (Shamsi) date and datetime (based on python datetime's module) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |