public int getAge(Date dateOfBirth) {
	    Calendar now = Calendar.getInstance();
	    Calendar dob = Calendar.getInstance();

	    dob.setTime(dateOfBirth);

	    int age = now.get(Calendar.YEAR) - dob.get(Calendar.YEAR);

	    if (now.get(Calendar.DAY_OF_YEAR) < dob.get(Calendar.DAY_OF_YEAR)) 
	    {
	        age--;
	    }

	    return age;
	}