Here you can find the source of getDateString(long date, int style, Locale locale)
public static String getDateString(long date, int style, Locale locale)
//package com.java2s; import java.text.DateFormat; import java.util.Locale; public class Main { public static String getDateString(long date, int style, Locale locale) { DateFormat formatter = DateFormat.getDateInstance(style, locale); return formatter.format(date); }//w ww . j a v a 2s . c o m }