private void validateDate(int date, int month, int year)
	{
		// If year is divisble by four its a leap year.
		boolean isLeapYear = isLeapYear(year);

		if (year < MIN_YEAR || year > MAX_YEAR)
		{
			throw new NumberFormatException("Invalid year entered");
		}

		if (month <= 0 || month > MONTHS.length)
		{
			throw new NumberFormatException("Invalid month entered");
		}

		int daysInMonth = isLeapYear && month == 2 ? DAYS_IN_MONTH[month - 1] + 1
				: DAYS_IN_MONTH[month - 1];

		if (date <= 0 || date > daysInMonth)
		{
			throw new NumberFormatException("Invalid date entered");
		}

		mDate = date;
		mMonth = month;
		mYear = year;

		System.out.println("Date entered - " + (date > 9 ? "" : "0") + date
				+ " " + MONTHS[month - 1] + " " + year);
	}