http://tool.oschina.net/apidocs/apidoc?api=jdk-zh https://www.jianshu.com/p/c8f16cab35e1# 参考官方的 api说明文档,format是一个抽象接口,已知的实现类有DateFormat,MessageFormat,NumberFormat 关于时间的DateFormat,我们一般是直接使用它的子类:SimpleDateFormat,具体的y,m,d,之类的用法可以参考百度 例子如下:获取当前系统的时间并格式化…