GregorianCalendar¶
- class badidatetime.tests.test_gregorian_calendar.TestGregorianCalendar(name)[source]¶
Bases:
TestCaseThis test class provides unittests for the GregorianCalendar class. Many tests use the Gregorian dates and their corresponding fixed dates below.
March 19, 1844 = Historic JD 2394645.11511552 (Baha’i Epoch)January, 1, 1970 = Historic JD 2440587.5 (UNIX Epoch)- _classSetupFailed = False¶
- _class_cleanups = []¶
- test__check_valid_gregorian_month_day()[source]¶
Check that the year, month, day, hour, minute, and second in a gregorian date are in bounds. Also check that if a decimal number is used there are no succeeding number at all.
- test__is_leap_year()[source]¶
Test that the _is_leap_year method correctly determines the Gregorian leap year.
- test_date_from_ymdhms()[source]¶
Test that the date_from_ymdhms method returns a (year, month, day.partial) from a (year, month, day, hour, minute, second).
- test_gregorian_date_from_jd()[source]¶
Test that the gregorian_date_from_jd method returns a Gregorian date from a Julian day.
- test_gregorian_year_from_jd()[source]¶
Test that the gregorian_year_from_jd method returns a Gregorian year from a Julian day.
- test_jd_from_gregorian_date()[source]¶
Test that the jd_from_gregorian_date method returns a Julian day from a Gregorian date.