Here you can find the source of getCurrentDate(String format)
public static String getCurrentDate(String format)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String getCurrentDate(String format) { SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.SIMPLIFIED_CHINESE); Date date = new Date(); String currentDate = sdf.format(date); return currentDate; }/* w w w. ja v a2 s . co m*/ }