Here you can find the source of formatDate(Date date, Locale locale)
public synchronized static String formatDate(Date date, Locale locale)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String formatDate(long millis, Locale locale) { Date d = new Date(); d.setTime(millis);/* w w w . j a va 2 s .co m*/ return formatDate(d, locale); } public synchronized static String formatDate(Date date, Locale locale) { if (date == null) { return null; } DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, locale); return format.format(date); } }