Java Now nowInBasicFormat()

Here you can find the source of nowInBasicFormat()

Description

now In Basic Format

License

Apache License

Declaration

public static String nowInBasicFormat() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    private static final ThreadLocal<SimpleDateFormat> BASIC = new ThreadLocal<SimpleDateFormat>() {
        @Override/* w  w  w . j ava 2 s .c om*/
        protected SimpleDateFormat initialValue() {
            return new SimpleDateFormat("yyyy.MM.dd HH:mm:ss.SSS");
        }
    };

    public static String nowInBasicFormat() {
        return BASIC.get().format(new Date());
    }
}

Related

  1. nowDT()
  2. nowFile()
  3. nowFormat(String format)
  4. nowFormat(String format)
  5. nowIdentity()
  6. nowStr()
  7. nowString(String pattern)
  8. nowString(String pattern)
  9. nowTime(String formartStr)