code:
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
calendar.set(2012, Calendar.JANUARY, 13);
System.out.println(format.format(calendar.getTime()));
calendar.add(Calendar.MONTH, -1);
System.out.println(format.format(calendar.getTime()));
output:
2012-01-13
2011-12-13