title: Calculating your date of birth in Java
body: <p>I'm trying to create a program which works out how many days you've lived for. The code below is as far as I've got to. Is there a certain date type for a variable to store your date of birth?</p>
  
  <pre><code>public static void main(String[] args) {
      Scanner Input = new Scanner(System.in);
      Date CurrentDate = new Date();
      DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      int day;        
      int month;
      int year;
      int noofDaysOld = 0;
  
      System.out.println("Age Calculator");
      System.out.println();
      System.out.println("Current Date: "+ dateFormat.format(CurrentDate));
      System.out.println("Find out how many days you have lived for");
      System.out.println();
      System.out.println("Input your date of birth");
      System.out.println("Day (of month e.g. 4th)");
      day = Input.nextInt();
      System.out.println("Month (no e.g. 1: January)");
      month = Input.nextInt();
      System.out.println("Year");
      year = Input.nextInt();
      System.out.println();
      noofDaysOld = CalculateDayAge(day, month, year);
      System.out.println("You age in days is: "+noofDaysOld);        
  }    
      public static int CalculateDayAge(int dayNo, int monthNo, int yearAD){
          Date DateofBirth;
          DateofBirth;
          return DayAge;
      }        
  </code></pre>
  
  <p>}</p>