Here you can find the source of getCurrentStringDate()
public static String getCurrentStringDate()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { /**/*from w w w. java2 s .co m*/ * yyyy-MM-dd Comment for <code>onlyDateFmt</code> */ public static final SimpleDateFormat onlyDateFmt = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA); public static String getCurrentStringDate() { return onlyDateFmt.format(getCurrentDate()); } public static Date getCurrentDate() { return new Date(System.currentTimeMillis()); } }