Julian calendar

The Julian calendar was implemented by Julius Caesar in 45 BC as a reformation of the Roman calendar. It is designed to follow the solar year, with a standard year of 365 days and a quadrennial leap year with an intercalary day (29 February).

For the first several centuries of its use, the Julian calendar did not have a single year-numbering system. The Romans initially specific years with the names of political leaders. Later on, different areas employed different era with various epochs. Between the sixth and eighth centuries, western Europe adopted the Anno Domini convention.

This numbering system does not include a year 0. However, for dates before 1, this module uses the astronomical convention of including a year 0 to simplify mathematical comparisons across epochs. To present a date in the standard convention, use the julian.format() function.

convertdate.julian.format(year, month, day, format_string='%-d %B %y')
convertdate.julian.from_gregorian(year, month, day)

Convert a Gregorian date to a Julian date.

convertdate.julian.from_jd(jd)

Calculate Julian calendar date from Julian day

convertdate.julian.leap(year)
convertdate.julian.legal_date(year, month, day)

Check if this is a legal date in the Julian calendar

convertdate.julian.month_length(year, month)
convertdate.julian.monthcalendar(year, month)

Returns a matrix representing a month’s calendar. Each row represents a week; days outside of the month are represented by zeros. Each week begins with Sunday.

convertdate.julian.to_gregorian(year, month, day)

Convert a Julian date to a Gregorian date.

convertdate.julian.to_jd(year, month, day)

Convert to Julian day using astronomical years (0 = 1 BC, -1 = 2 BC)