Java Date Format Pattern getHeaderFormat()

Here you can find the source of getHeaderFormat()

Description

get Header Format

License

Open Source License

Declaration

private static DateFormat getHeaderFormat() 

Method Source Code

//package com.java2s;

import java.text.DateFormat;

import java.text.SimpleDateFormat;
import java.util.*;

public class Main {
    private static final String HEADER_FORMAT = "EEE, d MMM yyyy HH:mm:ss z";
    private static final ThreadLocal<DateFormat> headerFormat = new ThreadLocal<DateFormat>();

    private static DateFormat getHeaderFormat() {
        DateFormat format = headerFormat.get();
        if (format == null) {
            format = new SimpleDateFormat(HEADER_FORMAT, Locale.ENGLISH);
            format.setTimeZone(TimeZone.getTimeZone("UTC"));
            headerFormat.set(format);// w ww  .j  a va2 s .c  o m
        }
        return format;
    }
}

Related

  1. getFormatter()
  2. getFormatter(final String pattern)
  3. getFormatter(String pattern)
  4. getFormatters()
  5. getFormatToSecsForFilename()
  6. getLenientFormat(String format)
  7. getMM()
  8. getMM(Date date)
  9. getMM(String strDate)