Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Jangal/python-dilami-calendar
Dilami (Gilaki) calendar for python
https://github.com/Jangal/python-dilami-calendar
calendar date datetime daylami deylami dilami gilaki python
Last synced: about 1 month ago
JSON representation
Dilami (Gilaki) calendar for python
- Host: GitHub
- URL: https://github.com/Jangal/python-dilami-calendar
- Owner: Jangal
- License: mit
- Created: 2019-07-25T12:46:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-04T07:43:16.000Z (over 3 years ago)
- Last Synced: 2024-11-05T07:50:05.225Z (about 2 months ago)
- Topics: calendar, date, datetime, daylami, deylami, dilami, gilaki, python
- Language: Python
- Homepage: https://giltime.ir
- Size: 36.1 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-dilami-calendar
[![Build Status](https://travis-ci.org/Jangal/python-dilami-calendar.svg?branch=master)](https://travis-ci.org/Jangal/python-dilami-calendar)
![PyPI](https://img.shields.io/pypi/v/dilami-calendar)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dilami-calendar)
![GitHub license](https://img.shields.io/github/license/Jangal/python-dilami-calendar)## Install
```bash
pip install dilami-calendar
```## Usage
Get current datetime in Dilami
```python
from dilami_calendar import DilamiDatetimeprint(DilamiDatetime.now())
```
Convert Gregorian datetime to Dilami
```python
from datetime import datetime
from dilami_calendar import DilamiDatetimegregorian_datetime = datetime(2018, 2, 1)
dilami_datetime = DilamiDatetime(gregorian_datetime)```
Convert Dilami to Gregorian datetime
```python
from dilami_calendar import DilamiDatetimedilami_datetime = DilamiDatetime(1591, 6, 28)
gregorian_datetime = dilami_datetime.to_datetime()
```Read attributes
```python
from dilami_calendar import DilamiDatetimed = DilamiDatetime().now()
print(
d.year,
d.month,
d.day,
d.hour,
d.minute,
d.second
)
```Set time-zone
```python
import pytz
from dilami_calendar import DilamiDatetimed = DilamiDatetime(tzinfo=pytz.timezone('Asia/Tehran')).now()
print(d)```
## Maybe You Like
[PHP Dilami Calendar](https://github.com/Jangal/php-dilami-calendar)
[C++ Dilami Calendar](https://github.com/LordArma/Dilami-Calendar-C-)
[Arduino Dilami Calendar](https://github.com/LordArma/Dilami-Calendar-Arduino)
[.Net Dilami Calendar](https://github.com/Jangal/Dilami-Calendar-.Net)
[تقویم دیلمی](http://giltime.ir)## Credits
- https://github.com/pylover/khayyam
- [wiki:گاهشماری_گیلکی](https://fa.wikipedia.org/wiki/%DA%AF%D8%A7%D9%87%E2%80%8C%D8%B4%D9%85%D8%A7%D8%B1%DB%8C_%DA%AF%DB%8C%D9%84%DA%A9%DB%8C)