code: public static final float toJulian(Calendar c) {
  
          int Y = c.get(Calendar.YEAR);
          int M = c.get(Calendar.MONTH);
          int D = c.get(Calendar.DATE);
          int A = Y / 100;
          int B = A / 4;
          int C = 2 - A + B;
          float E = (int) (365.25f * (Y + 4716));
          float F = (int) (30.6001f * (M + 1));
          float JD = C + D + E + F - 1524.5f;
  
          return JD;
      }
docs: Return a Julian date based on the input parameter. This is based from
  calculations found at <a
  href="http://quasar.as.utexas.edu/BillInfo/JulianDatesG.html">Julian Day
  Calculations (Gregorian Calendar)</a>, provided by Bill Jeffrys.
  
  @param c
  a calendar instance
  @return the julian day number