参考资料:
http://alexfc.iteye.com/blog/363185
http://biancheng.dnbcw.info/java/99937.html
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
java.util.Date now = new Date();
java.util.Date date = null;
try {
date = df.parse("2013-12-16 11:30:24");
} catch (ParseException e) {
e.printStackTrace();
return "";
}
long difference = now.getTime() - date.getTime();
long year = difference / 1000 / 60 / 60 / 24 / 30 / 12;
long month = difference / 1000 / 60 / 60 / 24 / 30;
long day = difference / (24 * 60 * 60 * 1000);
long hour = (difference / (60 * 60 * 1000) - day * 24);
long min = ((difference / (60 * 1000)) - day * 24 * 60 - hour * 60);
long second = (difference / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60);
System.out.println(year + "年" + month + "月" + day + "天" + hour + "小时" + min + "分" + second + "秒");