Possible Duplicate:
Why does Java’s Date.getYear() return 111 instead of 2011?
I am trying to get the year, month and day form a Date-object, but the following gives me something completely random:
Date d = new Date();
System.out.println(d.getYear() + " - " + d.getMonth() + " - " + d.getDay());
I get: 112 - 9 - 1
Does anyone know why? And do you have a bette apporch? For my program i need the Date objects.