Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

taqwim.py

Gregorian to Hijri and Hijri to Gregorian date conversion using the Umm al-Qura calendar.

Python port of arabic_date_time Flutter package.

Installation

pip install taqwim

Usage

from taqwim import Date, gregorian_to_hijri, hijri_to_gregorian

# Gregorian to Hijri
hijri = gregorian_to_hijri(Date(day=1, month=1, year=2024))
print(hijri)  # 19-6-1445

# Hijri to Gregorian
gregorian = hijri_to_gregorian(Date(day=1, month=1, year=1445))
print(gregorian)  # 19-7-2023

# Date arithmetic on Hijri dates
next_month = hijri.any_next_arabic_month_date()
prev_month = hijri.any_previous_arabic_month_date()
added = hijri.add_to_arabic_date(days=10)
subtracted = hijri.subtract_from_arabic_date(days=5)

# Convert Hijri to Python datetime
dt = hijri.to_english_datetime()

# Create Date from Python datetime
from datetime import datetime
date = Date.from_datetime(datetime.now())

Valid Date Range

  • Gregorian: August 1, 1924 to November 16, 2077
  • Hijri: 1343/1/1 to 1500/12/30

License

MIT

Metadata

Release files for taqwim 0.0.1b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for taqwim 0.0.1b1
File Size Uploaded
taqwim-0.0.1b1.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taqwim 0.0.1b1
File Interpreter ABI Platform
taqwim-0.0.1b1-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / taqwim-0.0.1b1.tar.gz

Download URL taqwim-0.0.1b1.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
96f817084a03d64781e5ee2de7a5e0b4402206caea1733ade37c5839fa982c04
BLAKE2b-256 checksum
How to use checksums
17976ca38bea7360eec2cf3e8c621ff4c15de3432a98543c41cbc78a42650184
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.

Transparency log

Release files / taqwim-0.0.1b1-py3-none-any.whl

Download URL taqwim-0.0.1b1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
701357039edb387fa25d8863d01fb7b13cef163fcdfad7c705b74f09dee699a4
BLAKE2b-256 checksum
How to use checksums
eac3372ed5a3c8ac86e09612b8c6201ecaafb07f164dad29d5b2638585414dd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1b1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page