Java tutorial
import java.util.Calendar; import java.util.Formatter; public class Main { public static void main(String[] argv) throws Exception { Formatter fmt = new Formatter(); Calendar cal = Calendar.getInstance(); fmt.format("Long date format: "); fmt.format("%tA %1$tB %1$td, %1$tY\n", cal); System.out.println(fmt); } } //Long date format: Monday March 09, 2009