Here you can find the source of formatDate(final Date date)
Parameter | Description |
---|---|
date | the date to format |
public static String formatDate(final Date date)
//package com.java2s; //License from project: Open Source License import java.util.Date; import java.text.SimpleDateFormat; public class Main { /**// w w w .j ava 2 s. c o m * formats a date object to a nice format * * @param date the date to format * @return a nicely formatted date * */ public static String formatDate(final Date date) { final SimpleDateFormat formatter = new SimpleDateFormat("EEE MMM dd, yyyy"); return formatter.format(date); } }