Socket
Book a DemoInstallSign in
Socket

deylami-calendar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deylami-calendar

Deylami (Gilaki) calendar for python

0.1.3
pipPyPI
Maintainers
1

python-deylami-calendar

Build Status

Install

pip install deylami-calendar

Usage

Get current datetime in deylami

from deylami_calendar import DeylamiDatetime

print(DeylamiDatetime.now())

Convert Gregorian datetime to Deylami

from datetime import datetime
from deylami_calendar import DeylamiDatetime

gregorian_datetime = datetime(2018, 2, 1)
deylami_datetime = DeylamiDatetime(gregorian_datetime)

Convert Deylami to Gregorian datetime

from deylami_calendar import DeylamiDatetime

deylami_datetime = DeylamiDatetime(1591, 6, 28)
gregorian_datetime = deylami_datetime.to_datetime()

Read attributes

from deylami_calendar import DeylamiDatetime

d = DeylamiDatetime().now()
print(
    d.year,
    d.month,
    d.day,
    d.hour,
    d.minute,
    d.second
)

Set time-zone

import pytz
from deylami_calendar import DeylamiDatetime

d = DeylamiDatetime(tzinfo=pytz.timezone('Asia/Tehran')).now()
print(d)

Credits

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.