Java Date Format Pattern getFormat(String format)

Here you can find the source of getFormat(String format)

Description

get Format

License

Open Source License

Declaration

protected static SimpleDateFormat getFormat(String format) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;

public class Main {
    /** yyyy-MM-dd hh:mm:ss */
    public static final String DATE_FORMAT2 = "yyyy-MM-dd HH:mm:ss";

    protected static SimpleDateFormat getFormat(String format) {
        if (format == null || "".equals(format)) {
            format = DATE_FORMAT2;//from   www. ja v  a 2s  . c o  m
        }
        return new SimpleDateFormat(format);
    }
}

Related

  1. getFolderFormat()
  2. getFormat()
  3. getFormat()
  4. getFormat(long stamp)
  5. getFormat(long stamp, String pattern)
  6. getFormat(String formatPattern)
  7. getFormat(String formatString)
  8. getFormat(String pattern)
  9. getFormatCurrentAdd(int amount, String format)