def _from_jd_schematic(jd, method):
if jd < EPOCH:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>J = trunc(jd) + <NUM_LIT:0.5> - EPOCH<EOL>y0, y1, y2, y3, y4, y5 = <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0><EOL>intercal_cycle_days = leap_suppression_days = over_cycle_days = None<EOL>if (J <= DAYS_IN_YEAR * <NUM_LIT:12> + <NUM_LIT:3> and<EOL>method in (<NUM_LIT:100>, '<STR_LIT>')) or (J <= DAYS_IN_YEAR * <NUM_LIT> + <NUM_LIT:4> and method in (<NUM_LIT>, '<STR_LIT>')):<EOL><INDENT>method = <NUM_LIT:4><EOL><DEDENT>if method in (<NUM_LIT:4>, '<STR_LIT>'):<EOL><INDENT>J = J + <NUM_LIT><EOL>y5 = - <NUM_LIT:1><EOL><DEDENT>elif method in (<NUM_LIT:100>, '<STR_LIT>'):<EOL><INDENT>y5 = <NUM_LIT:12><EOL>J = J - DAYS_IN_YEAR * <NUM_LIT:12> - <NUM_LIT:3><EOL>leap_suppression_yrs = <NUM_LIT><EOL>leap_suppression_days = <NUM_LIT>  <EOL>intercal_cycle_yrs = <NUM_LIT><EOL>intercal_cycle_days = <NUM_LIT>  <EOL>over_cycle_yrs = <NUM_LIT><EOL>over_cycle_days = <NUM_LIT>  <EOL><DEDENT>elif method in (<NUM_LIT>, '<STR_LIT>'):<EOL><INDENT>y5 = <NUM_LIT:16><EOL>J = J - DAYS_IN_YEAR * <NUM_LIT:16> - <NUM_LIT:4><EOL>leap_suppression_yrs = <NUM_LIT><EOL>leap_suppression_days = <NUM_LIT>  <EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if over_cycle_days:<EOL><INDENT>y0 = trunc(J / over_cycle_days) * over_cycle_yrs<EOL>J = J % over_cycle_days<EOL><DEDENT>if intercal_cycle_days:<EOL><INDENT>y1 = trunc(J / intercal_cycle_days) * intercal_cycle_yrs<EOL>J = J % intercal_cycle_days<EOL><DEDENT>if leap_suppression_days:<EOL><INDENT>y2 = trunc(J / leap_suppression_days) * leap_suppression_yrs<EOL>J = J % leap_suppression_days<EOL><DEDENT>y3 = trunc(J / LEAP_CYCLE_DAYS) * LEAP_CYCLE_YEARS<EOL>if J % LEAP_CYCLE_DAYS == LEAP_CYCLE_DAYS - <NUM_LIT:1>:<EOL><INDENT>J = <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>J = J % LEAP_CYCLE_DAYS<EOL><DEDENT>y4 = trunc(J / DAYS_IN_YEAR)<EOL>if J == DAYS_IN_YEAR * <NUM_LIT:4>:<EOL><INDENT>y4 = y4 - <NUM_LIT:1><EOL>J = <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>J = J % DAYS_IN_YEAR<EOL><DEDENT>year = y0 + y1 + y2 + y3 + y4 + y5<EOL>month = trunc(J / <NUM_LIT>)<EOL>J = J - month * <NUM_LIT:30><EOL>return year + <NUM_LIT:1>, month + <NUM_LIT:1>, trunc(J) + <NUM_LIT:1><EOL>
Convert from JD using various leap-year calculation methods