Bahá’í calendar

The Bahá’í (Badí) calendar is a solar calendar with 19 months of 19 days.

Every four years, an intercalary period, Ayyam-i-Há, occurs between the 18th and 19th months. Dates in this period are returned as month 19, and the month of ‘Alá is always reported as month 20.

from convertdate import bahai
# the first day of Ayyam-i-Ha:
bahai.to_gregorian(175, 19, 1)
# (2019, 2, 26)
# The first day of 'Ala:
bahai.to_gregorian(175, 20, 1)
# (2019, 3, 2)
convertdate.bahai.format(year, month, day, lang=None)

Convert a Baha’i date into a string with the format DD MONTH YYYY.

convertdate.bahai.from_gregorian(year, month, day)
convertdate.bahai.from_jd(jd)

Calculate Bahai date from Julian day

convertdate.bahai.gregorian_nawruz(year)

Return Nawruz in the Gregorian calendar. Returns a tuple (month, day), where month is always 3

convertdate.bahai.month_length(year, month)
convertdate.bahai.monthcalendar(year, month)
convertdate.bahai.to_gregorian(year, month, day)
convertdate.bahai.to_jd(year, month, day)

Determine Julian day from Bahai date