Code example for Calendar

Methods: get, setTimeInMillis

0
 
        private void setTime(long timeInMillis) {
            if (calendar == null) {
                calendar = Calendar.getInstance();
            } 
            calendar.setTimeInMillis(timeInMillis);
            month = calendar.get(Calendar.MONTH);
            year = calendar.get(Calendar.YEAR);
            day = calendar.get(Calendar.DAY_OF_MONTH);
        } 
    } 
 
    public SimpleMonthAdapter(Context context,
            DatePickerController controller) {
        mContext = context;
        mController = controller;
        init(); 
        setSelectedDay(mController.getSelectedDay());
    } 
 
    /**