def _ymd2ord(year, month, day):
assert <NUM_LIT:1> <= month <= <NUM_LIT:12>, '<STR_LIT>'<EOL>dim = _days_in_month(year, month)<EOL>assert <NUM_LIT:1> <= day <= dim, ('<STR_LIT>' % dim)<EOL>return (_days_before_year(year) +<EOL>_days_before_month(year, month) +<EOL>day)<EOL>
year, month, day -> ordinal, considering 01-Jan-0001 as day 1.