I am trying to compare dates and I have found where my code goes wrong, but I don't know why.
I am trying to compare a date with todays date (using Gregorian Calendars only). I have printed out todays date where ever it is mentioned in the code and in one place it magically changes from year 2010 to year 3910 (todays year + 1900).
Does anyone know any reason for this? I will post my code if needed but I honestly haven't changed the date object at all.
As requested here's the code:
    //Prints out 2010   
    System.out.println("TodaysDate.getYear():\t" + todaysDate.getYear());
    //Prints out 2010
    System.out.println(todaysDate); 
    //Getting a year from a string (it is 2010)
    todaysDate.setYear(Integer.parseInt(yea));
    //Prints out 2010   
    System.out.println("TodaysDate.getYear():\t" + todaysDate.getYear());
    //Prints out 3910   
    System.out.println(todaysDate);