A Persian calendar package and countdowns
Project description
Persian Calendar
A Python package to get the current Jalali (Persian) date.
Installation
pip install persianCalendar
usage
pc_fa = PersianCalendar(use_persian_numbers=True) print("== خروجی فارسی ==") print("تاریخ امروز (جلالی):", pc_fa.format_date(pc_fa.today_jalali())) print("تاریخ امروز (قمری تقریبی):", pc_fa.get_hijri_date()) print("زمان تا نوروز:", str(pc_fa.next_nowruz()).split('.')[0]) print("زمان تا چهارشنبهسوری:", pc_fa.next_chaharshanbe_suri()) print("زمان تا پایان مدارس:", pc_fa.next_school_end()) print("زمان تا سیزده بدر:", pc_fa.next_sizdah_bedar()) print("زمان فعلی:", pc_fa.current_time()) fa_day, _ = pc_fa.current_day_names() print("نام روز امروز (فارسی):", fa_day) print("شماره هفته در سال شمسی:", pc_fa.week_number()) print("نام ماه جلالی:", pc_fa.current_jalali_month_name()) print("نام ماه قمری (Gregorian):", pc_fa.current_gregorian_month_name()) pc_en = PersianCalendar(use_persian_numbers=False) print("\n== English Output ==") print("Today's Jalali Date:", pc_en.format_date(pc_en.today_jalali())) print("Today's Hijri Date (approx.):", pc_en.get_hijri_date()) print("Time until Nowruz:", str(pc_en.next_nowruz()).split('.')[0]) print("Time until Chaharshanbe Suri:", pc_en.next_chaharshanbe_suri()) print("Time until School End:", pc_en.next_school_end()) print("Time until Sizdah Bedar:", pc_en.next_sizdah_bedar()) print("Current Time:", pc_en.current_time()) _, en_day = pc_en.current_day_names() print("Today's Day (English):", en_day) print("Week number in Jalali year:", pc_en.week_number()) print("Current Jalali Month Name:", pc_en.current_jalali_month_name()) print("Current Gregorian Month Name:", pc_en.current_gregorian_month_name())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file persiancalendar-0.1.0.tar.gz.
File metadata
- Download URL: persiancalendar-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28036af26fc6d21f48f0c2889f6c01429ca3ad3b9093a5929060528c38f2704f
|
|
| MD5 |
5a1f7f9b49791d4648417ec5d9925b24
|
|
| BLAKE2b-256 |
4b4a1feaddf5f9ab6074a5eb0a6088a0283caf6f161e1e42f074d3548a162f4a
|
File details
Details for the file persiancalendar-0.1.0-py3-none-any.whl.
File metadata
- Download URL: persiancalendar-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc43116d95f7ac4c7484641c6d5da410e971cd6b714a99a7be4060f1dde50d6c
|
|
| MD5 |
b2a1a88c8b3d5c755f09e670082666d5
|
|
| BLAKE2b-256 |
5985513c7040af9d740ffab258f3aafa4fdaeb7eb803056f4558f64e25ffd915
|