X-Holidays
A comprehensive Python library for managing Persian (Jalali), International, and Islamic holidays, as well as famous birthdays.
Features
- Jalali Date Support
- National & Seasonal Holidays
- International Observances
- Famous Birthdays
- Islamic Holidays
Files
X-Holidays/
├── LICENSE
├── MANIFEST.in
├── README.md
├── requirements.txt
├── setup.py
├── test_app.py
└── x_holidays/
---->├── init.py
---->├── utils.py
---->├── seasons.py
---->├── global_events.py
---->├── birthdays.py
---->└── islamic.py
Installation
pip install git+https://github.com/Amir-X/X-Holidays.git
- Or:
pip install X-Holidays
- Or clone and install locally:
git clone https://github.com/Amir-X/X-Holidays.git
cd X-Holidays
pip install -e .
Usage
from x_holidays import Holiday
manager = Holiday()
# Get all holidays for Jalali Year 1403
holidays = manager.get_all_holidays(1403)
for h in holidays[:5]:
print(h)
# Search for a keyword
results = manager.search_by_keyword("nowruz", year=1403)
print(results)
# Check if a specific date is a holiday
import jdatetime
date_to_check = jdatetime.date(1403, 1, 1)
if manager.is_holiday(date_to_check):
print(f"{date_to_check} is a holiday!")
# Calculate working days
wd_count = manager.count_working_days("1403-01-01", "1403-01-10")
print(f"Working days: {wd_count}")
Author
Amir-X
Requirements
jdatetime>=4.1.0
hijri-converter>=2.2.0
Metadata
Release files for X-Holidays 1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| x_holidays-1.1.6.tar.gz | 12.7 kB | Without provenance | Details for x_holidays-1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| x_holidays-1.1.6-py3-none-any.whl | Python 3 | none | any | Details for x_holidays-1.1.6-py3-none-any.whl |
Total release size: 28.5 kB
Release files / x_holidays-1.1.6.tar.gz
| Download URL | x_holidays-1.1.6.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4852826510dd7459e10f29373cbd0905b7b3ba8e8d6e0134d3af8b33bf33444
|
|
BLAKE2b-256 checksum How to use checksums |
261b2ab1757693d1296383f67be4022e58f9b141853528cb036173335485cbf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / x_holidays-1.1.6-py3-none-any.whl
| Download URL | x_holidays-1.1.6-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75f82994ff3105dd13a41f7609f57d3228a4294431bd7b9aae6d7e83d65adac5
|
|
BLAKE2b-256 checksum How to use checksums |
c87ae01c963ea8dc3310103238510659c97cc235d3900497217cb0cb512fa2f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for X-Holidays 1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.