2 Replies Latest reply on Jul 17, 2007 12:11 PM by Urs Wagner

    Bug or featur

    Urs Wagner Novice

      Bug or feature?
      The result shoud be Dec 9 1966
      but I get
      birthday = Mon Jan 09 00:00:00 CET 1967
      What can I do else?

       Calendar calendar = GregorianCalendar.getInstance();
       calendar.clear();
       calendar.set(Calendar.YEAR, 1966);
       calendar.set(Calendar.DAY_OF_MONTH, 9);
       calendar.set(Calendar.MONTH, 12);
       Date birthday = calendar.getTime();
      
       System.out.println("birthday = " + birthday);