Java tutorial
import java.util.Calendar; public class MainClass { public static void main(String args[]) { Calendar dateTime = Calendar.getInstance(); System.out.printf("%1$tA, %1$tB %1$td, %1$tY\n", dateTime); System.out.printf("%1$TA, %1$TB %1$Td, %1$TY\n", dateTime); System.out.printf("%1$ta, %1$tb %1$te, %1$ty\n", dateTime); } }