Here you can find the source of formatDate(Date d)
Parameter | Description |
---|---|
d | the date |
public static String formatDate(Date d)
//package com.java2s; import java.text.DateFormat; import java.util.Date; public class Main { /**//from w w w . java 2s.co m * Formats the input date to string. * @param d the date * @return the string representation of the date */ public static String formatDate(Date d) { return d != null ? DateFormat.getDateInstance().format(d) : ""; } }