Here you can find the source of currentDate_DDMMYY()
public static String currentDate_DDMMYY()
//package com.java2s; import java.text.DateFormat; import java.util.Date; public class Main { /**//from w w w .java 2 s . c om * Speaking method for easier scripting. * * @return current date in format like 24.12.13 */ public static String currentDate_DDMMYY() { return currentDate(DateFormat.SHORT); } /** * Current date as formatted string representation. * * @param dateStyle * one of DateFormat.SHORT, MEDIUM, LONG, FULL * @return the formatted date string. */ public static String currentDate(int dateStyle) { DateFormat df = DateFormat.getDateInstance(dateStyle); return df.format(new Date()); } }