Here you can find the source of formatDateHeader(final long date)
public static String formatDateHeader(final long date)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Red Hat, Inc../* w w w . j a va 2 s . c o m*/ * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String DATE_HEADER_FMT = "EEE, dd MMM yyyy HH:mm:ss zzz"; public static String formatDateHeader(final long date) { return new SimpleDateFormat(DATE_HEADER_FMT).format(new Date(date)); } public static String formatDateHeader(final Date date) { return new SimpleDateFormat(DATE_HEADER_FMT).format(date); } }