code: def dt2jd(dt):
      
      a = (14 - dt.month)//12
      y = dt.year + 4800 - a
      m = dt.month + 12*a - 3
      return dt.day + ((153*m + 2)//5) + 365*y + y//4 - y//100 + y//400 - 32045
docs: Convert datetime to julian date