Here you can find the source of formatDate(Calendar date)
Parameter | Description |
---|---|
date | The date |
@Deprecated public static String formatDate(Calendar date)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { /**/* w ww .j a v a 2 s .co m*/ * A formatter for generating date strings. The output format is * {@code YYYY-MM-DD}. */ private static SimpleDateFormat dateFormatter = null; /** * Format a date to YYYY-MM-dd format * @param date The date * @return The formatted date */ @Deprecated public static String formatDate(Calendar date) { return dateFormatter.format(date.getTime()); } }