Gregorian to Hijri and Hijri to Gregorian date conversion using the Umm al-Qura calendar
Project description
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
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 taqwim-0.0.1b1.tar.gz.
File metadata
- Download URL: taqwim-0.0.1b1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96f817084a03d64781e5ee2de7a5e0b4402206caea1733ade37c5839fa982c04
|
|
| MD5 |
ff91c63196d9b9292f3ca265231fa2dd
|
|
| BLAKE2b-256 |
17976ca38bea7360eec2cf3e8c621ff4c15de3432a98543c41cbc78a42650184
|
Provenance
The following attestation bundles were made for taqwim-0.0.1b1.tar.gz:
Publisher:
publish.yaml on Greentech-Apps-Limited/taqwim.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taqwim-0.0.1b1.tar.gz -
Subject digest:
96f817084a03d64781e5ee2de7a5e0b4402206caea1733ade37c5839fa982c04 - Sigstore transparency entry: 1316904973
- Sigstore integration time:
-
Permalink:
Greentech-Apps-Limited/taqwim.py@f424d997b6c52000507d65a9c71f60cf574956ff -
Branch / Tag:
refs/tags/0.0.1b1 - Owner: https://github.com/Greentech-Apps-Limited
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f424d997b6c52000507d65a9c71f60cf574956ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file taqwim-0.0.1b1-py3-none-any.whl.
File metadata
- Download URL: taqwim-0.0.1b1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
701357039edb387fa25d8863d01fb7b13cef163fcdfad7c705b74f09dee699a4
|
|
| MD5 |
6e8f7962d79178a530f2707eeadaa431
|
|
| BLAKE2b-256 |
eac3372ed5a3c8ac86e09612b8c6201ecaafb07f164dad29d5b2638585414dd5
|
Provenance
The following attestation bundles were made for taqwim-0.0.1b1-py3-none-any.whl:
Publisher:
publish.yaml on Greentech-Apps-Limited/taqwim.py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
taqwim-0.0.1b1-py3-none-any.whl -
Subject digest:
701357039edb387fa25d8863d01fb7b13cef163fcdfad7c705b74f09dee699a4 - Sigstore transparency entry: 1316904976
- Sigstore integration time:
-
Permalink:
Greentech-Apps-Limited/taqwim.py@f424d997b6c52000507d65a9c71f60cf574956ff -
Branch / Tag:
refs/tags/0.0.1b1 - Owner: https://github.com/Greentech-Apps-Limited
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f424d997b6c52000507d65a9c71f60cf574956ff -
Trigger Event:
push
-
Statement type: