Accurate Hijri-Gregorian date converter based on the Umm al-Qura calendar
Project description
Hijri Converter
A Python package to convert accurately between Hijri and Gregorian dates using the Umm al-Qura calendar of Saudi Arabia.
Features
- Accurate and tested date conversion.
- Optimized code performance compared to similar packages.
- Intuitive, clean, and easy-to-use interface.
- Most of the methods and formats are similar to those of standard library.
- Multilingual representation of weekday names, months, and calendar notations.
- Easily extendable to support other natural languages.
- Rich comparison between dates.
- Validation of input dates.
- Works on Python 3.6+ with zero dependencies.
- Thoroughly tested on all supported python versions.
Limitations
- The date range supported by converter is limited to the period from the beginning of 1343 AH (1 August 1924 CE) to the end of 1500 AH (16 November 2077 CE).
- The conversion is not intended for religious purposes where sighting of the lunar crescent at the beginning of Hijri month is still preferred.
Installation
pip install -U hijri-converter
Basic Usage
from hijri_converter import convert
# Convert a Hijri date to Gregorian
g_date = convert.Hijri(1403, 2, 17).to_gregorian()
# Convert a Gregorian date to Hijri
h_date = convert.Gregorian(1982, 12, 2).to_hijri()
Documentation
Please see https://dralshehri.github.io/hijri-converter/ for full documentation of this package, including background, benchmarking, usage examples and API reference.
Changelog
All notable changes to this package are documented in CHANGELOG.md.
Contributing
Any contribution is welcome! Refer to CONTRIBUTING.md for instructions and local development commands.
Authors
Authors and acknowledgments are listed in AUTHORS.md.
License
This package is distributed under an MIT license. See LICENSE.
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 hijri-converter-2.1.2.tar.gz.
File metadata
- Download URL: hijri-converter-2.1.2.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43b5ac566e7a7deeab364a2397e94405a65fd24ea786073eb3d4c740ebda7b9b
|
|
| MD5 |
337246fa0ad7a59cb4c055a772472ad3
|
|
| BLAKE2b-256 |
4113125f4781f794e457c96d71a16a46c78d3b34bf716805c6ba0ee3fb06ae80
|
File details
Details for the file hijri_converter-2.1.2-py3-none-any.whl.
File metadata
- Download URL: hijri_converter-2.1.2-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b323d5f75b7e238d7e8760570d7ad8cabfc890af15c9f7945b6422d14603d33c
|
|
| MD5 |
50d8a57edc7894d7ba7a19ac3aa09cba
|
|
| BLAKE2b-256 |
e35fc4baaa22e77e359ec45a3cd32d887fa5c35cb044e29f776c73025e4011b4
|