Code example for Date

Methods: getTimesetMinutessetTime

0
	} 
 
	/** Initialize the components for the given date field */ 
	public void setDate(Date newDate) {
		if (newDate == null) {
			date = new Date();
			date.setTime(date.getTime() + 1 * 24L * 3600 * 1000);
			date.setMinutes(0);
		} else 
			this.date = new Date(newDate.getTime());
 
		updateDate(); 
		updateTime(); 
	} 
 
	public void onDateSet(DatePicker view, int year, int month, int monthDay) {
		date.setYear(year - 1900);
		date.setMonth(month);
		date.setDate(monthDay);
		updateDate();