hijridate

Accurate Hijri-Gregorian dates converter based on Umm al-Qura calendar

https://github.com/dralshehri/hijridate

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary

Keywords

calendar conversion converter date gregorian hijri islamic python saudi-arabia ummalqura ummulqura
Last synced: 6 months ago · JSON representation ·

Repository

Accurate Hijri-Gregorian dates converter based on Umm al-Qura calendar

Basic Info
Statistics
  • Stars: 74
  • Watchers: 7
  • Forks: 15
  • Open Issues: 0
  • Releases: 11
Topics
calendar conversion converter date gregorian hijri islamic python saudi-arabia ummalqura ummulqura
Created over 7 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

HijriDate

formerly hijri-converter

A Python package for accurate Hijri-Gregorian date conversion using the Umm al-Qura calendar.

HijriDate provides reliable date conversion based on official sources, including archived Umm al-Qura newspaper publications and comparative calendar data from King Abdulaziz City for Science and Technology (KACST). The package has been thoroughly tested and verified against original references to ensure accuracy and reliability.

Release Status Coverage Status PyPI Downloads PyPI Version Conda Version Package License Package DOI

✨ Features

  • Accurate and verified Hijri-Gregorian date conversion
  • Based on official Umm al-Qura calendar sources and archived publications
  • Optimized performance compared to existing implementations
  • Comprehensive input validation and error handling
  • Multilingual support for Arabic, English, and other languages
  • Rich comparison operations and date formatting options
  • Full type annotations and 100% test coverage
  • Zero runtime dependencies
  • Compatible with Python 3.9+

⚠️ Limitations

Date Range: The converter supports dates from 1343 AH to 1500 AH (1 August 1924 CE to 16 November 2077 CE), corresponding to the period covered by available official calendar sources.

Religious Context: Not intended for religious purposes where lunar crescent sighting is preferred over astronomical calculations.

📦 Installation

To install using uv, run:

shell uv add hijridate

To install using pip, run:

shell pip install hijridate

To install using conda, run:

shell conda install -c conda-forge hijridate

🚀 Basic Usage

```python from hijridate import Hijri, Gregorian

Convert a Hijri date to Gregorian

hijridate = Hijri(1445, 6, 15) gregoriandate = hijridate.togregorian() print(gregorian_date) # 2023-12-28

Convert a Gregorian date to Hijri

gregoriandate = Gregorian(2023, 12, 28) hijridate = gregoriandate.tohijri() print(hijri_date) # 1445-06-15 ```

📚 Documentation

Please refer to https://hijridate.readthedocs.io for complete documentation on this package, which includes background information, benchmarking, usage examples, and API reference.

🤝 Contributing

If you're interested in contributing, please check out the Contributing guide for more information on how you can help!

📄 License

This project is licensed under the terms of the MIT license.

🙏 Acknowledgements

  • R.H. van Gent — inspiration, scientific guidance and resources.
  • @AZalshehri7 — support in dates review and conversion accuracy verification.

📝 Citation

If you plan to cite this project in your academic publication, please refer to https://doi.org/10.5281/zenodo.11200950 for citation information.

Owner

  • Name: Mohammed Alshehri
  • Login: dralshehri
  • Kind: user
  • Location: Jeddah

Citation (CITATION.cff)

cff-version: 1.2.0
message: 'If you use this software, please cite it using the metadata from this file.'
type: software
title: 'HijriDate: A Python package for Hijri-Gregorian date conversion'
authors:
  - given-names: Mohammed H
    family-names: Alshehri
    orcid: 'https://orcid.org/0000-0001-5852-3363'
abstract: >-
  HijriDate is a Python package for accurate Hijri-Gregorian date conversion using
  Saudi Arabia's official Umm al-Qura calendar. Validated against archived Umm al-Qura
  publications and KACST reference data, it provides reliable calendar conversion for
  both research applications and software development. The package features comprehensive
  type safety, multilingual support, and optimized performance with zero dependencies.
keywords:
  - hijri
  - gregorian
  - ummalqura
  - ummulqura
  - calendar
  - date
  - converter
  - conversion
version: 2.5.0
date-released: 2024-05-25
license: MIT
doi: 10.5281/zenodo.11200950
repository-code: 'https://github.com/dralshehri/hijridate'

GitHub Events

Total
  • Watch event: 9
  • Pull request event: 2
  • Fork event: 2
Last Year
  • Watch event: 9
  • Pull request event: 2
  • Fork event: 2

Committers

Last synced: almost 2 years ago

All Time
  • Total Commits: 398
  • Total Committers: 3
  • Avg Commits per committer: 132.667
  • Development Distribution Score (DDS): 0.008
Past Year
  • Commits: 36
  • Committers: 2
  • Avg Commits per committer: 18.0
  • Development Distribution Score (DDS): 0.028
Top Committers
Name Email Commits
Mohammed Alshehri 5****i 395
Nazmul Haque Naqib 3****r 2
David Hotham d****m@m****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 16
  • Total pull requests: 6
  • Average time to close issues: 11 days
  • Average time to close pull requests: 20 days
  • Total issue authors: 16
  • Total pull request authors: 3
  • Average comments per issue: 2.25
  • Average comments per pull request: 2.5
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 8 minutes
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • kloczek (1)
  • maherkhalil07 (1)
  • PureTryOut (1)
  • impubes (1)
  • MosabAwadexp (1)
  • AlfaazHanif (1)
  • KhawajaJunaidlaam (1)
  • aalsaedi (1)
  • hajsf (1)
  • ozgenezgi (1)
  • moheikal79 (1)
  • NoraD1 (1)
  • abimanyug26 (1)
  • rokesby (1)
  • colathurv (1)
Pull Request Authors
  • nokibsarkar (4)
  • dependabot[bot] (2)
  • abdelslam1997 (2)
  • dimbleby (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 6
  • Total downloads:
    • pypi 2,109,934 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 31
  • Total maintainers: 2
proxy.golang.org: github.com/dralshehri/hijridate
  • Versions: 23
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.2%
Average: 6.4%
Dependent repos count: 6.6%
Last synced: 6 months ago
pypi.org: hijridate

Accurate Hijri-Gregorian dates converter based on Umm al-Qura calendar

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 2
  • Downloads: 2,109,934 Last month
Rankings
Dependent packages count: 7.4%
Stargazers count: 9.0%
Average: 10.4%
Forks count: 10.6%
Dependent repos count: 11.9%
Downloads: 13.1%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-hijridate

Accurate Hijri-Gregorian date converter based on the Umm al-Qura calendar

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 11.8%
Stargazers count: 22.6%
Forks count: 24.5%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-hijridate-pyc

Precompiled Python bytecode for py3-hijridate

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 11.8%
Stargazers count: 22.6%
Forks count: 24.5%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-hijridate-pyc

Precompiled Python bytecode for py3-hijridate

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 13.4%
Average: 16.5%
Stargazers count: 25.4%
Forks count: 27.2%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-hijridate

Accurate Hijri-Gregorian date converter based on the Umm al-Qura calendar

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 13.4%
Average: 16.5%
Stargazers count: 25.4%
Forks count: 27.2%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/requirements.txt pypi
  • myst-parser ==0.17.2
  • sphinx ==4.5.0
  • sphinx-notfound-page ==0.8.0
  • sphinx-rtd-theme ==1.0.0
requirements-dev.txt pypi
  • black ==22.3.0 development
  • isort ==5.10.1 development
  • mypy ==0.950 development
  • pylint ==2.13.9 development
  • pytest ==7.0.1 development
  • pytest-cov ==3.0.0 development
  • taskipy ==1.10.2 development
.github/workflows/checks.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/draft.yml actions
  • actions/checkout v2 composite
  • softprops/action-gh-release v1 composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/github-script v5 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi
setup.py pypi