Here you can find the source of getLongDateStr(Date date)
Parameter | Description |
---|---|
date | to be converted |
public static String getLongDateStr(Date date)
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { final static DateFormat LONG_DATE_FORMAT = new SimpleDateFormat( "EEE, MMM dd"); /**/*from w ww.j a va 2 s .c om*/ * Converts given date time to long date string. * <p/> * Example input: "2014-09-10 22:15:12" * Example output: "Wed, Sep 10" * * @param date to be converted * @return str */ public static String getLongDateStr(Date date) { return LONG_DATE_FORMAT.format(date); } }