private static int[] bH2GA(int yh, int mh){
	    	int[] out = new int[4];
	        int Dy, m;
	        long JD;
	        double GJD;
	        /* Make sure that the date is within the range of the tables */
	        if (mh < 1)
	        {
	            mh = 12;
	        }
	         
	        if (mh > 12)
	        {
	            mh = 1;
	        }
	         
	        if (yh < HStartYear)
	        {
	            yh = HStartYear;
	        }
	         
	        if (yh > HEndYear)
	        {
	            yh = HEndYear;
	        }
	        Double doubleHolder = hCalendarToJD(yh,1,1);
	        JD = doubleHolder.longValue();
	        /* estimate JD of the begining of the year */
	        Dy = MonthMap[yh - HStartYear] / 4096;
	        /* Mask 1111000000000000 */
	        GJD = JD - 3 + Dy;
	        for (m = 1;m < mh;m++){
	            GJD = GJD + getMonthLength(yh, m);
	        }
	        int[] result = jDToGCalendar(GJD);
	        out[0] = result[0];
	        out[1] = result[1];
	        out[2] = result[2];
	        doubleHolder = GJD;
	        JD = doubleHolder.longValue();
	        Long longHolder = (JD + 1) % 7;
	        out[3] = longHolder.intValue();
	        return out;
	    }