Code example for Calendar

Methods: get, setTime

0
		_origYear = this.year = year;
	} 
	 
	public CalendarDialog(Date date) {
		_calendar = Calendar.getInstance();
		_calendar.setTime(date);
		_origDay = day = _calendar.get(Calendar.DAY_OF_MONTH);
		_origMonth = month = _calendar.get(Calendar.MONTH);
		_origYear = year = _calendar.get(Calendar.YEAR);
	} 
	 
	private final DatePickerDialog.OnDateSetListener _dateListener = new DatePickerDialog.OnDateSetListener() {
		public void onDateSet(DatePicker view, int newYear, int newMonth, int newDay) { 
			day = newDay; 
			month = newMonth; 
			year = newYear; 
			CalendarDialog.this.onDateSet(newDay, newMonth, newYear); 
		} 
	}; 
	 
	public abstract void onDateSet(int day, int month, int year);