def to_jd(year, month, day):
legal_date(year, month, day)<EOL>gyear = year + YEAR_EPOCH - <NUM_LIT:1><EOL>return (<EOL>gregorian.EPOCH - <NUM_LIT:1> + (<NUM_LIT> * (gyear - <NUM_LIT:1>)) +<EOL>floor((gyear - <NUM_LIT:1>) / <NUM_LIT:4>) + (-floor((gyear - <NUM_LIT:1>) / <NUM_LIT:100>)) +<EOL>floor((gyear - <NUM_LIT:1>) / <NUM_LIT>) + (month - <NUM_LIT:1>) * <NUM_LIT> + day<EOL>)<EOL>
Convert a Positivist date to Julian day count.