Skip to main content

A package for converting Hijriah Calendar Day

Project description

Hijriah Date Converter

Build Status

A package to convert between Hijri and Gregorian calendar date using the Umm al-Qura calendar.

Installation

Still work in progress

Features

  • (Probably) supported ISO and another extendable date format
  • Representation to string with formatted name of the month based on hijriah calendar
  • Offset and limit range for both calendar

Usage

The usage itself is quite straightforward, just inputted the gregorian or hijri version of the calendar with something like:

from hijri.core import Hijriah

# convert gregorian calendary day into hijriah
>>> gregorian = Hijriah(23, 2, 2021)
>>> print(gregorian.to_hijri())

# convert hijriah calendar day into gregorian
>>> hijriah = Hijriah(1403, 2, 17)
>>> print(hijriah.to_gregorian())

# getting hijri based month for both calendar
>>> example = Hijriah(21, 2, 2009).get_hijri_month()
>>> print(example)
'Safar'

# converting into ISO format
>>> example = Hijriah.to_representation(21, 2, 2009, "ISO")
'2009/21/2'

Acknowledgment

For the calculation formula itself i adopted from several packages, especially with these two, Python Islamic Library and Hijri.js for accuracy itself, i don't know how accurate it is for calendar conversion.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hijri-calendar-0.1.0.linux-x86_64.tar.gz (21.5 kB view hashes)

Uploaded Source

Built Distribution

hijri_calendar-0.1.0-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page