# hijri-converter
A Python package to convert accurately between Hijri and Gregorian dates using
the Umm al-Qura calendar.
> ⚠️ **Deprecation Notice**
>
> This package has been **deprecated** and will not receive future updates.
> Please use the [hijridate](https://pypi.org/project/hijridate/) package
> instead.
>
> For migration to `hijridate`, install the package:
>
> ```
> pip install hijridate~=2.3.0
> ```
>
> Then change the import statement as:
>
> ```py
> from hijridate import Hijri, Gregorian
> ```
## Features
- Accurate and verified 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 era
notations.
- Easily extendable to support other natural languages.
- Rich comparison between dates.
- Validation of input dates.
- Works on Python 3.7+ with zero dependencies.
- Thoroughly tested with 100% test coverage.
## 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
To install using `pip`, run:
```shell
pip install hijri-converter
```
To install using `conda`, run:
```shell
conda install -c conda-forge hijri-converter
```
## Basic Usage
```python
from hijri_converter import Hijri, Gregorian
# Convert a Hijri date to Gregorian
g = Hijri(1403, 2, 17).to_gregorian()
# Convert a Gregorian date to Hijri
h = Gregorian(1982, 12, 2).to_hijri()
```
## Documentation
Please see <https://hijri-converter.readthedocs.io> for full documentation of
this package, including background, benchmarking, usage examples and API
reference.
## License
This project is licensed under the terms of the MIT license.
## Acknowledgements
- [R.H. van Gent](http://www.staff.science.uu.nl/~gent0113) — inspiration,
scientific guidance and resources.
- [@AZalshehri7](https://github.com/AZalshehri7) — support in dates review
and conversion accuracy verification.
Raw data
{
"_id": null,
"home_page": "https://hijri-converter.readthedocs.io",
"name": "hijri-converter",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "hijri,gregorian,date,converter,ummalqura,saudi,calendar",
"author": "Mohammed Alshehri",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/8e/ca/f26e91818264caca15ba9ef71d99dea51c8391bf2818aabde278d9642441/hijri-converter-2.3.1.tar.gz",
"platform": null,
"description": "# hijri-converter\n\nA Python package to convert accurately between Hijri and Gregorian dates using\nthe Umm al-Qura calendar.\n\n> \u26a0\ufe0f **Deprecation Notice**\n>\n> This package has been **deprecated** and will not receive future updates.\n> Please use the [hijridate](https://pypi.org/project/hijridate/) package\n> instead.\n>\n> For migration to `hijridate`, install the package:\n>\n> ```\n> pip install hijridate~=2.3.0\n> ```\n>\n> Then change the import statement as:\n>\n> ```py\n> from hijridate import Hijri, Gregorian\n> ```\n\n## Features\n\n- Accurate and verified date conversion.\n- Optimized code performance compared to similar packages.\n- Intuitive, clean, and easy-to-use interface.\n- Most of the methods and formats are similar to those of standard library.\n- Multilingual representation of weekday names, months, and calendar era\n notations.\n- Easily extendable to support other natural languages.\n- Rich comparison between dates.\n- Validation of input dates.\n- Works on Python 3.7+ with zero dependencies.\n- Thoroughly tested with 100% test coverage.\n\n## Limitations\n\n- The date range supported by converter is limited to the period from the\n beginning of 1343 AH (1 August 1924 CE) to the end of 1500 AH (16 November\n 2077 CE).\n- The conversion is not intended for religious purposes where sighting of the\n lunar crescent at the beginning of Hijri month is still preferred.\n\n## Installation\n\nTo install using `pip`, run:\n\n```shell\npip install hijri-converter\n```\n\nTo install using `conda`, run:\n\n```shell\nconda install -c conda-forge hijri-converter\n```\n\n## Basic Usage\n\n```python\nfrom hijri_converter import Hijri, Gregorian\n\n\n# Convert a Hijri date to Gregorian\ng = Hijri(1403, 2, 17).to_gregorian()\n\n# Convert a Gregorian date to Hijri\nh = Gregorian(1982, 12, 2).to_hijri()\n```\n\n## Documentation\n\nPlease see <https://hijri-converter.readthedocs.io> for full documentation of\nthis package, including background, benchmarking, usage examples and API\nreference.\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n\n## Acknowledgements\n\n- [R.H. van Gent](http://www.staff.science.uu.nl/~gent0113) — inspiration,\n scientific guidance and resources.\n- [@AZalshehri7](https://github.com/AZalshehri7) — support in dates review\n and conversion accuracy verification.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Accurate Hijri-Gregorian dates converter based on the Umm al-Qura calendar",
"version": "2.3.1",
"split_keywords": [
"hijri",
"gregorian",
"date",
"converter",
"ummalqura",
"saudi",
"calendar"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4acf7bd8c3a8d1b8290cf11398439bcf30b9fb10dfe8247202edeaeea9cbdd5a",
"md5": "bc2ca2da6e7f19a3aec5eb62746c5577",
"sha256": "c04f072c78e1854a1f474ada253a3377009457221dbc1b14999761728e663662"
},
"downloads": -1,
"filename": "hijri_converter-2.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bc2ca2da6e7f19a3aec5eb62746c5577",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 13997,
"upload_time": "2023-04-25T09:48:08",
"upload_time_iso_8601": "2023-04-25T09:48:08.497094Z",
"url": "https://files.pythonhosted.org/packages/4a/cf/7bd8c3a8d1b8290cf11398439bcf30b9fb10dfe8247202edeaeea9cbdd5a/hijri_converter-2.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8ecaf26e91818264caca15ba9ef71d99dea51c8391bf2818aabde278d9642441",
"md5": "2f9d38436b1e26b9d53c219e114dbbf3",
"sha256": "069b6789291e0830f4860a79dcd34fb3ceea3b95516ed4010202b9656ba1ab61"
},
"downloads": -1,
"filename": "hijri-converter-2.3.1.tar.gz",
"has_sig": false,
"md5_digest": "2f9d38436b1e26b9d53c219e114dbbf3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 34482,
"upload_time": "2023-04-25T09:48:12",
"upload_time_iso_8601": "2023-04-25T09:48:12.475305Z",
"url": "https://files.pythonhosted.org/packages/8e/ca/f26e91818264caca15ba9ef71d99dea51c8391bf2818aabde278d9642441/hijri-converter-2.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-25 09:48:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "hijri-converter"
}