private static int[] jDToGCalendar(double JD){
	    	int[] out = new int[3];
	        double A, B, F;
	        int alpha, C, E;
	        long D, Z;
	        Z = (long)Math.floor(JD + 0.5);
	        F = (JD + 0.5) - Z;
	        alpha = (int)((Z - 1867216.25) / 36524.25);
	        A = Z + 1 + alpha - alpha / 4;
	        B = A + 1524;
	        C = (int)((B - 122.1) / 365.25);
	        D = (long)(365.25 * C);
	        E = (int)((B - D) / 30.6001);
	        Double holder = B - D - Math.floor(30.6001 * E) + F;
	        out[2] = holder.intValue();
	        if (E < 14)
	        	out[1] = E - 1;
	        else
	        	out[1] = E - 13; 
	        if (out[1] > 2)
	        	out[0] = C - 4716;
	        else
	        	out[0] = C - 4715; 
	        F = F * 24.0;
	        return out;
	    }