Here you can find the source of formatDate(java.util.Date paramDate)
public static String formatDate(java.util.Date paramDate)
//package com.java2s; import java.text.SimpleDateFormat; public class Main { public static String formatDate(java.util.Date paramDate) { if (paramDate == null) return null; SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); localSimpleDateFormat.setLenient(false); return localSimpleDateFormat.format(paramDate); }//w w w . jav a 2 s. c o m }