齐全的时间工具类,

public class DateUtils {
	
    /**
     * 为了确保同一毫秒不能返回相同的值,不能明在方法里面.<br>
     * 把Random对象作为一个全局实例(static)来使用. Java中Random是线程安全的(内部进行了加锁处理);
     */
    private static final Random JVM_RANDOM = new Random();

    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public static final String DATE_SIMPLE_FORMAT = "yyyy-MM-dd";

    public static final String DATE_SIMPLE_STR_FORMAT = "yyyy年MM月dd日";

    public static final String DATE_SIMPLE_YMDH_FORMAT = "yyyy年MM月dd日HH时";

    public static final String Date_SIMPLE_LONG_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
    
    public static final String DATE_SIMPLE_A_FORMAT = "yyyyMMdd";
    
    public static final String DATE_SIMPLE_B_FORMAT = "yyyyMMddHHmmss";

    public static final String DATE_FORMAT_Z = "EEE MMM dd HH:mm:ss Z yyyy";

    public static final String FORMAT_T = &
上一篇:vscode 设置 格式化文档时 属性不自动换行、 js 代码不自动换行(vue代码 data中定义的数据不自动换行)


下一篇:No appropriate protocol (protocol is disabled or cipher suites are inappropriate) 解决办法