Code example for Time

Methods: setJulianDay

0
            frag.selectJulianDay(jd);
        } 
    } 
 
    public int getPositionForJulianDay(int julianDay) {
        mTime.setJulianDay(mCenterJulianDay);
 
        Calendar center = Calendar.getInstance();
        center.set(mTime.year, mTime.month, 1);
 
        mTime.setJulianDay(julianDay);
 
        Calendar query = Calendar.getInstance();
        query.set(mTime.year, mTime.month, 1);
 
        int diff = getMonthsDifference(center, query);
        return getCenterPosition() + diff - 1;
    } 
 
    public int getSelectedJulianDay(int pos) {
        int jd = mCenterJulianDay;