Java tutorial
import java.text.DateFormat; import java.util.Date; public class Main { public static void main(String[] argv) throws Exception { DateFormat dateFormat = DateFormat.getDateTimeInstance(); String s = dateFormat.format(new Date()); System.out.println(dateFormat.getCalendar()); } }