Here you can find the source of formatDate(java.util.Calendar in)
Parameter | Description |
---|---|
in | non-null Calandar |
public static String formatDate(java.util.Calendar in)
//package com.java2s; //License from project: Apache License import java.text.*; public class Main { /**/*from www . j a va 2 s . co m*/ * convert a Calendar into a readable string * @param in non-null Calandar * @return non-null String */ public static String formatDate(java.util.Calendar in) { return (formatDate(in.getTime())); } /** * convert a Date into a readable string * @param in non-null Date * @return non-null String */ public static String formatDate(java.util.Date in) { SimpleDateFormat fmt = new SimpleDateFormat("dd-MMM-yyyy HH:mm"); return (fmt.format(in)); } }