Skip to main content

Dilami (Gilaki) calendar for python

Project description

python-dilami-calendar

Build Status PyPI PyPI - Python Version GitHub license

Install

pip install dilami-calendar

Usage

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)

Maybe You Like

PHP Dilami Calendar
C++ Dilami Calendar
Arduino Dilami Calendar
.Net Dilami Calendar
تقویم دیلمی

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dilami_calendar-0.4.3.tar.gz (9.8 kB view details)

Uploaded Source

File details

Details for the file dilami_calendar-0.4.3.tar.gz.

File metadata

  • Download URL: dilami_calendar-0.4.3.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.7

File hashes

Hashes for dilami_calendar-0.4.3.tar.gz
Algorithm Hash digest
SHA256 67a6ff785fe3a9decbcdc8aa926730896ec0436db888cdcf549813210adea51c
MD5 608123e0c327fc0a158c3c00db3f229b
BLAKE2b-256 ded89d8980368708a7aa3673abfc7af6e0bfc9f8f3a7e9ac2b25aa7110b1f41f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page