Rokh provides a unified interface for accessing Iranian calendar events across Jalali, Gregorian, and Hijri date systems. It lets you easily retrieve national holidays, cultural events, and religious occasions by simply passing a date. It automatically converts between calendars and return event's description. You can use it in your apps, bots, and research tools that rely on Iranian date conversions, holidays, and cultural event data.
In Farsi, Rokh is derived from Rokhdad, meaning "event." Rokh itself also means "face" and even refers to the "rook" piece in chess.
| PyPI Counter |
|
| Github Stars |
|
| Branch | main | dev |
| CI |
|
|
- Check Python Packaging User Guide
- Run
pip install rokh==0.1
- Download Version 0.1 or Latest Source
- Run
pip install .
Use get_events to retrieve all Iranian calendar events for a given date.
Simply specify the date (in Jalali, Gregorian, or Hijri format), and the function returns corresponding events.
>>> from rokh import get_events, DateSystem
>>> result = get_events(day=1, month=1, year=1403, input_date_system=DateSystem.JALALI)
# {
# 'events': {
# 'gregorian': [
# {
# 'description': 'روز جهانی شادی',
# 'is_holiday': False
# }
# ],
# 'hijri': [],
# 'jalali': [
# {
# 'description': 'جشن نوروز/جشن سال نو',
# 'is_holiday': True
# }
# ]
# },
# 'gregorian_date': {'day': 20, 'month': 3, 'year': 2024},
# 'hijri_date': {'day': 10, 'month': 9, 'year': 1445},
# 'jalali_date': {'day': 1, 'month': 1, 'year': 1403},
# 'is_holiday': True,
# 'input_date_system': 'jalali',
# 'event_date_system': 'all'
# }Just fill an issue and describe it. We'll check it ASAP! or send an email to rokh@openscilab.com.
- Please complete the issue template
1- ساعت و تقویم ایران | تاریخ امروز | Time.ir
2- Jalali Holiday API
Give a ⭐️ if this project helped you!
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .
