public static void main(String[] args) {
function();
}
private static void function() {
// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH点mm分ss秒");
String date = sdf.format(new Date());
System.out.println(date);
}
SimpleDateFormat类的format()函数
最新推荐文章于 2022-07-03 02:19:08 发布