标签:style blog ar color os sp for java div
1 /** 2 * 格式化日期为 年-月-日 3 * @param time 4 * @return 5 */ 6 public static String formatDate(Date time){ 7 Formatter formatter = new Formatter(); 8 formatter.format("%tF %tT", time,time); 9 String ti = formatter.toString(); 10 formatter.close(); 11 return ti; 12 } 13 14 15 public static String formatShortDate(Date time){ 16 Formatter formatter = new Formatter(); 17 formatter.format("%tF", time); 18 String ti = formatter.toString(); 19 formatter.close(); 20 return ti; 21 }
标签:style blog ar color os sp for java div
原文地址:http://www.cnblogs.com/kirno/p/4162733.html