Convertdate Library

2.4.1 · active · verified Thu Apr 09

The `convertdate` library provides methods and functions for converting dates between various calendar systems, including Gregorian, Hebrew, Islamic, Julian, Mayan, and many others. It is currently at version 2.4.1 and sees a few releases per year, indicating active development.

Warnings

Install

Imports

Quickstart

Demonstrates converting Gregorian dates to French Republican and Hebrew calendars, and generating a Julian month calendar.

from convertdate import french_republican
from convertdate import hebrew
from convertdate import julian

# Convert Gregorian date to French Republican
fr_date = french_republican.from_gregorian(2014, 10, 31)
print(f"Gregorian 2014-10-31 in French Republican: {fr_date}")

# Convert Gregorian date to Hebrew
he_date = hebrew.from_gregorian(2014, 10, 31)
print(f"Gregorian 2014-10-31 in Hebrew: {he_date}")

# Generate a Julian month calendar for January 2015
julian_month_calendar = julian.monthcalendar(2015, 1)
print(f"Julian calendar for Jan 2015: {julian_month_calendar}")

view raw JSON →