- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
public static Date round(Date d) {
try {
SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy");
return sdf.parse(sdf.format(d));
} catch (ParseException ex) {
//This exception will never be thrown, because sdf parses what it formats
return d;
}
}
Влажнота!
и кстати капча сломалась