pip install dilami-calendar
Get current datetime in Dilami
from dilami_calendar import DilamiDatetime
print(DilamiDatetime.now())
Convert Gregorian datetime to Dilami
from datetime import datetime
from dilami_calendar import DilamiDatetime
gregorian_datetime = datetime(2018, 2, 1)
dilami_datetime = DilamiDatetime(gregorian_datetime)
Convert Dilami to Gregorian datetime
from dilami_calendar import DilamiDatetime
dilami_datetime = DilamiDatetime(1591, 6, 28)
gregorian_datetime = dilami_datetime.to_datetime()
Read attributes
from dilami_calendar import DilamiDatetime
d = DilamiDatetime().now()
print(
d.year,
d.month,
d.day,
d.hour,
d.minute,
d.second
)
Set time-zone
import pytz
from dilami_calendar import DilamiDatetime
d = DilamiDatetime(tzinfo=pytz.timezone('Asia/Tehran')).now()
print(d)
PHP Dilami Calendar
C++ Dilami Calendar
Arduino Dilami Calendar
.Net Dilami Calendar
تقویم دیلمی