Mistři v programování na #hovnokod

Java #1410

Někdo nezná DateFormat.

Calendar cal = Calendar.getInstance();
cal.setTime(dtm);
String string = cal.get(java.util.Calendar.YEAR) + "" + ((cal.get(java.util.Calendar.MONTH) + 1) < 10 ? "0" + (cal.get(java.util.Calendar.MONTH) + 1) : (cal.get(java.util.Calendar.MONTH) + 1)) + "" + (cal.get(java.util.Calendar.DAY_OF_MONTH) < 10 ? "0" + cal.get(java.util.Calendar.DAY_OF_MONTH) : cal.get(java.util.Calendar.DAY_OF_MONTH));

Anonymous,